gwion-util
utilities for the Gwion project
|
#include <pthread.h>
Go to the source code of this file.
Typedefs | |
typedef pthread_t | gwtthread_t |
typedef pthread_mutex_t | gwtlock_t |
typedef pthread_cond_t | gwtcond_t |
typedef void * | gwtreturn_t |
typedef struct threadpool_t | threadpool_t |
Enumerations | |
enum | threadpool_error_t { threadpool_lock_failure = -2 , threadpool_queue_full = -3 , threadpool_shutdown = -4 , threadpool_thread_failure = -5 } |
Functions | |
threadpool_t * | new_threadpool (const uint32_t thread_count, const uint32_t queue_size) |
ANN2 (1, 2) bool threadpool_add(threadpool_t *pool | |
ANN void | free_threadpool (threadpool_t *pool) |
static ANN int | gwt_lock (gwtlock_t *lock) |
static ANN int | gwt_unlock (gwtlock_t *lock) |
static ANN void | gwt_join (gwtthread_t thread) |
static ANN void | gwt_wait (gwtcond_t *cond, gwtlock_t *lock) |
static ANN int | gwt_broadcast (gwtcond_t *cond) |
static ANN int | gwt_signal (gwtcond_t *cond) |
static ANN int | gwt_lock_ini (gwtlock_t *lock) |
static ANN void | gwt_lock_end (gwtlock_t *lock) |
static ANN int | gwt_cond_ini (gwtcond_t *cond) |
static ANN void | gwt_cond_end (gwtcond_t *cond) |
static ANN bool | gwt_create (gwtthread_t *thread, gwtreturn_t(*fun)(void *), void *arg) |
Variables | |
void(* | routine )(void *) |
void void * | arg |
typedef pthread_cond_t gwtcond_t |
Definition at line 13 of file threadpool.h.
typedef pthread_mutex_t gwtlock_t |
Definition at line 12 of file threadpool.h.
typedef void* gwtreturn_t |
Definition at line 14 of file threadpool.h.
typedef pthread_t gwtthread_t |
Definition at line 11 of file threadpool.h.
typedef struct threadpool_t threadpool_t |
Definition at line 17 of file threadpool.h.
enum threadpool_error_t |
Enumerator | |
---|---|
threadpool_lock_failure | |
threadpool_queue_full | |
threadpool_shutdown | |
threadpool_thread_failure |
Definition at line 19 of file threadpool.h.
ANN2 | ( | 1 | , |
2 | ) |
ANN void free_threadpool | ( | threadpool_t * | pool | ) |
Definition at line 100 of file threadpool.c.
Definition at line 83 of file threadpool.h.
Definition at line 101 of file threadpool.h.
Definition at line 98 of file threadpool.h.
|
inlinestatic |
Definition at line 104 of file threadpool.h.
|
inlinestatic |
Definition at line 77 of file threadpool.h.
Definition at line 71 of file threadpool.h.
Definition at line 95 of file threadpool.h.
Definition at line 89 of file threadpool.h.
Definition at line 86 of file threadpool.h.
Definition at line 74 of file threadpool.h.
Definition at line 80 of file threadpool.h.
threadpool_t * new_threadpool | ( | const uint32_t | thread_count, |
const uint32_t | queue_size ) |
Definition at line 66 of file threadpool.c.
void void* arg |
Definition at line 27 of file threadpool.h.
void(* routine) (void *) | ( | void * | ) |
Definition at line 27 of file threadpool.h.