Go to the source code of this file.
Classes | |
struct | node |
struct | List |
struct | JobArgs |
Typedefs | |
typedef void(* | FuncPtr )(void *, void *) |
typedef node | node |
Functions | |
void * | job_exec (void *job_q) |
void | job_submit (List *job_q, FuncPtr func, void *args, int args_size) |
List * | job_queue_init (int pool_size) |
|
|
|
|
|
get the queue mutex "access" then if the queue is emapty it would go to sleep and release the mutex else get the first job out of queue and execute it |
|
initiate the queue and thread pool, returns a pointer to the initiated queue. |
|
get the queue mutex "access", creat a new node and pass func,args,args_size, add the new node to the queue, and signal the thread pool if the queue was empty. |