#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <err.h>
#include <poll.h>
#include "threadpool.h"
Go to the source code of this file.
#define ATOMIC_BOOL_COMPARE_AND_SWAP |
( |
|
PTR, |
|
|
|
OLD, |
|
|
|
NEW |
|
) |
| (__sync_bool_compare_and_swap(PTR, OLD, NEW)) |
static size_t fibs |
( |
size_t |
arg | ) |
|
|
static |
static void dump_stats |
( |
const char * |
prefix, |
|
|
struct threadpool_info * |
stats |
|
) |
| |
|
static |
static void task_cb |
( |
void * |
udata | ) |
|
|
static |
static void inf_loop_cb |
( |
void * |
env | ) |
|
|
static |
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 75 of file test_threadpool.c.
References dump_stats(), inf_loop_cb(), limit, threadpool_config::max_threads, threadpool_task::task, task_cb(), task_count, threadpool_config::task_ringbuf_size2, THREAD_SHUTDOWN_SECONDS, Threadpool_Free(), Threadpool_Init(), Threadpool_Schedule(), Threadpool_Shutdown(), and Threadpool_Stats().