Simple tools for multi threading / objects in plain C Snapshot
|
Go to the source code of this file.
Classes | |
struct | tagRUNNABLE |
struct | tagTHREADPOOL |
Typedefs | |
typedef void(* | RUNNABLE_HANDLER )(struct tagRUNNABLE *request) |
typedef struct tagRUNNABLE | RUNNABLE |
typedef struct tagTHREADPOOL | THREADPOOL |
Functions | |
void | RUNNABLE_init (RUNNABLE *runnable, RUNNABLE_HANDLER handler, RUNNABLE_HANDLER free_request) |
constructs a RUNNABLE instance | |
void | RUNNABLE_free (RUNNABLE *runnable) |
free a RUNNABLE instance | |
THREADPOOL * | THREADPOOL_init (RUNNABLE_HANDLER process_result, int queue_size, int num_threads, int stack_size_kb) |
constructs a thread pool and starts it. | |
void | THREADPOOL_close (THREADPOOL *pool) |
int | THREADPOOL_send_block_on_queue_full (THREADPOOL *pool, RUNNABLE *request) |
posts a work request to the pool; blocks if request queue limit is reached | |
int | THREADPOOL_send_fail_on_queue_full (THREADPOOL *pool, RUNNABLE *request) |
posts a work request to the pool; blocks if request queue limit is reached |
typedef void(* RUNNABLE_HANDLER)(struct tagRUNNABLE *request) |