job_queue.h File Reference

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)
Listjob_queue_init (int pool_size)


Typedef Documentation

typedef void(* FuncPtr)(void *, void *)
 

typedef struct node node
 


Function Documentation

void* job_exec void *  job_q  ) 
 

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

List* job_queue_init int  pool_size  ) 
 

initiate the queue and thread pool, returns a pointer to the initiated queue.

void job_submit List job_q,
FuncPtr  func,
void *  args,
int  args_size
 

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.


Generated on Thu Feb 16 21:42:39 2006 for Chimera by  doxygen 1.4.5