/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/utils/eh_thread_pool.c File Reference

#include <eh_utils.h>
#include <pthread.h>

Go to the source code of this file.

Functions

void tpool_init (tpool_t *tpoolp, int num_worker_threads, int max_queue_size, int do_not_block_when_full)
void tpool_thread (tpool_t tpool)
int tpool_add_work (tpool_t tpool, void *routine, void *arg)
int tpool_destroy (tpool_t tpool, int finish)


Function Documentation

int tpool_add_work ( tpool_t  tpool,
void *  routine,
void *  arg 
)

Definition at line 89 of file eh_thread_pool.c.

References tpool_work::arg, tpool::cur_queue_size, tpool::do_not_block_when_full, eh_new, tpool::max_queue_size, tpool_work::next, tpool::queue_closed, tpool::queue_head, tpool::queue_lock, tpool::queue_not_empty, tpool::queue_not_full, tpool::queue_tail, tpool_work::routine, and tpool::shutdown.

int tpool_destroy ( tpool_t  tpool,
int  finish 
)

Definition at line 135 of file eh_thread_pool.c.

References tpool::cur_queue_size, eh_exit(), eh_free, tpool_work::next, tpool::num_threads, tpool::queue_closed, tpool::queue_empty, tpool::queue_head, tpool::queue_lock, tpool::queue_not_empty, tpool::queue_not_full, tpool::shutdown, and tpool::threads.

void tpool_init ( tpool_t tpoolp,
int  num_worker_threads,
int  max_queue_size,
int  do_not_block_when_full 
)

Definition at line 6 of file eh_thread_pool.c.

References eh_exit(), eh_new, and tpool_thread().

void tpool_thread ( tpool_t  tpool  ) 

Definition at line 51 of file eh_thread_pool.c.

References tpool::cur_queue_size, tpool::queue_lock, tpool::queue_not_empty, and tpool::shutdown.

Referenced by tpool_init().


Generated on Fri Jan 4 18:04:19 2008 for sedflux by  doxygen 1.5.2