All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
thread_pool.h File Reference
#include <pthread.h>

Go to the source code of this file.


struct  t_pool_job
struct  t_res
struct  t_pool
struct  t_results_queue


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


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 

Definition at line 238 of file thread_pool.c.

void t_pool_destroy ( t_pool p,
int  kill 

Definition at line 588 of file thread_pool.c.

int t_pool_dispatch ( t_pool p,
t_results_queue q,
void *(*)(void *arg)  func,
void *  arg 

Definition at line 423 of file thread_pool.c.

int t_pool_dispatch2 ( t_pool p,
t_results_queue q,
void *(*)(void *arg)  func,
void *  arg,
int  nonblock 

Definition at line 483 of file thread_pool.c.

int t_pool_flush ( t_pool p)

Definition at line 560 of file thread_pool.c.

t_pool* t_pool_init ( int  qsize,
int  tsize 

Definition at line 383 of file thread_pool.c.

t_pool_result* t_pool_next_result ( t_results_queue q)

Definition at line 154 of file thread_pool.c.

t_pool_result* t_pool_next_result_wait ( t_results_queue q)

Definition at line 172 of file thread_pool.c.

int t_pool_results_queue_empty ( t_results_queue q)

Definition at line 200 of file thread_pool.c.

int t_pool_results_queue_len ( t_results_queue q)

Definition at line 214 of file thread_pool.c.

int t_pool_results_queue_sz ( t_results_queue q)

Definition at line 224 of file thread_pool.c.

void t_results_queue_destroy ( t_results_queue q)

Definition at line 271 of file thread_pool.c.

t_results_queue* t_results_queue_init ( void  )

Definition at line 254 of file thread_pool.c.