libgpac
Documentation of the core library of GPAC
|
#include <gpac/thread.h>
#include <sched.h>
#include <pthread.h>
#include <semaphore.h>
#include <errno.h>
#include <gpac/list.h>
Data Structures | |
struct | GF_Thread |
abstracted thread object More... | |
struct | GF_Mutex |
abstracted mutex object More... | |
struct | GF_Semaphore |
abstracted semaphore object More... | |
Typedefs | |
typedef pthread_t | TH_HANDLE |
Functions | |
static void | log_add_thread (GF_Thread *t) |
static void | log_del_thread (GF_Thread *t) |
static const char * | log_th_name (u32 id, char szName[100]) |
const char * | gf_th_log_name (GF_Thread *t) |
GF_EXPORT GF_Thread * | gf_th_new (const char *name) |
thread constructor More... | |
void * | RunThread (void *ptr) |
GF_EXPORT GF_Err | gf_th_run (GF_Thread *t, u32(*Run)(void *param), void *param) |
void | Thread_Stop (GF_Thread *t, Bool Destroy) |
GF_EXPORT void | gf_th_stop (GF_Thread *t) |
thread stopping More... | |
GF_EXPORT void | gf_th_del (GF_Thread *t) |
thread destructor More... | |
GF_EXPORT void | gf_th_set_priority (GF_Thread *t, s32 priority) |
thread priority More... | |
GF_EXPORT u32 | gf_th_status (GF_Thread *t) |
thread status query More... | |
GF_EXPORT u32 | gf_th_id () |
current thread ID More... | |
GF_EXPORT GF_Mutex * | gf_mx_new (const char *name) |
mutex constructor More... | |
GF_EXPORT void | gf_mx_del (GF_Mutex *mx) |
mutex denstructor More... | |
GF_EXPORT void | gf_mx_v (GF_Mutex *mx) |
mutex unlocking More... | |
GF_EXPORT u32 | gf_mx_p (GF_Mutex *mx) |
mutex locking More... | |
GF_EXPORT s32 | gf_mx_get_num_locks (GF_Mutex *mx) |
get mutex number of locks More... | |
GF_EXPORT Bool | gf_mx_try_lock (GF_Mutex *mx) |
mutex non-blocking lock More... | |
GF_EXPORT GF_Semaphore * | gf_sema_new (u32 MaxCount, u32 InitCount) |
semaphore constructor More... | |
GF_EXPORT void | gf_sema_del (GF_Semaphore *sm) |
semaphore destructor More... | |
GF_EXPORT Bool | gf_sema_notify (GF_Semaphore *sm, u32 NbRelease) |
semaphore notification. More... | |
GF_EXPORT Bool | gf_sema_wait (GF_Semaphore *sm) |
semaphore wait More... | |
GF_EXPORT Bool | gf_sema_wait_for (GF_Semaphore *sm, u32 TimeOut) |
semaphore time wait More... | |
Variables | |
static GF_List * | thread_bank = NULL |
static u32 | main_th_id = 0 |
typedef pthread_t TH_HANDLE |
|
static |
|
static |
|
static |
const char* gf_th_log_name | ( | GF_Thread * | t | ) |
void* RunThread | ( | void * | ptr | ) |
void Thread_Stop | ( | GF_Thread * | t, |
Bool | Destroy | ||
) |
|
static |
|
static |