NVBIO
|
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include "cram/thread_pool.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TIME |
#define | TDIFF(t2, t1) ((t2.tv_sec-t1.tv_sec)*1000000 + t2.tv_usec-t1.tv_usec) |
Functions | |
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_pool_delete_result (t_pool_result *r, int free_data) |
t_results_queue * | t_results_queue_init (void) |
void | t_results_queue_destroy (t_results_queue *q) |
t_pool * | t_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) |
#define DEBUG_TIME |
Definition at line 42 of file thread_pool.c.
#define TDIFF | ( | t2, | |
t1 | |||
) | ((t2.tv_sec-t1.tv_sec)*1000000 + t2.tv_usec-t1.tv_usec) |
Definition at line 294 of file thread_pool.c.
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.