Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
thread_pool.c File Reference
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <assert.h>
#include "cram/thread_pool.h"

Macros

#define IN_ORDER
 
#define TDIFF(t2, t1)   ((t2.tv_sec-t1.tv_sec)*1000000 + t2.tv_usec-t1.tv_usec)
 

Functions

t_pool_resultt_pool_next_result (t_results_queue *q)
 
t_pool_resultt_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_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)
 
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)
 

Macro Definition Documentation

#define IN_ORDER
#define TDIFF (   t2,
  t1 
)    ((t2.tv_sec-t1.tv_sec)*1000000 + t2.tv_usec-t1.tv_usec)

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  )