Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions
thread_pool.h File Reference
#include <pthread.h>

Go to the source code of this file.

Classes

struct  t_pool_job
 
struct  t_res
 
struct  t_pool_worker_t
 
struct  t_pool
 
struct  t_results_queue
 

Typedefs

typedef struct t_pool_job t_pool_job
 
typedef struct t_res t_pool_result
 
typedef struct t_pool t_pool
 
typedef struct t_results_queue t_results_queue
 

Functions

t_poolt_pool_init (int qsize, int tsize)
 
int t_pool_dispatch (t_pool *p, t_results_queue *q, void *(*func)(void *arg), void *arg)
 
int t_pool_dispatch2 (t_pool *p, t_results_queue *q, void *(*func)(void *arg), void *arg, int nonblock)
 
int t_pool_flush (t_pool *p)
 
void t_pool_destroy (t_pool *p, int kill)
 
t_pool_resultt_pool_next_result (t_results_queue *q)
 
t_pool_resultt_pool_next_result_wait (t_results_queue *q)
 
void t_pool_delete_result (t_pool_result *r, int free_data)
 
t_results_queuet_results_queue_init (void)
 
void t_results_queue_destroy (t_results_queue *q)
 
int t_pool_results_queue_empty (t_results_queue *q)
 
int t_pool_results_queue_len (t_results_queue *q)
 
int t_pool_results_queue_sz (t_results_queue *q)
 

Typedef Documentation

typedef struct t_pool t_pool
typedef struct t_pool_job t_pool_job
typedef struct t_res t_pool_result

Function Documentation

void t_pool_delete_result ( t_pool_result r,
int  free_data 
)
void t_pool_destroy ( t_pool p,
int  kill 
)
int t_pool_dispatch ( t_pool p,
t_results_queue q,
void *(*)(void *arg)  func,
void *  arg 
)
int t_pool_dispatch2 ( t_pool p,
t_results_queue q,
void *(*)(void *arg)  func,
void *  arg,
int  nonblock 
)
int t_pool_flush ( t_pool p)
t_pool* t_pool_init ( int  qsize,
int  tsize 
)
t_pool_result* t_pool_next_result ( t_results_queue q)
t_pool_result* t_pool_next_result_wait ( t_results_queue q)
int t_pool_results_queue_empty ( t_results_queue q)
int t_pool_results_queue_len ( t_results_queue q)
int t_pool_results_queue_sz ( t_results_queue q)
void t_results_queue_destroy ( t_results_queue q)
t_results_queue* t_results_queue_init ( void  )