#include <errno.h>
#include "common/pthreads_cross.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "workerpool.h"
#include "debug_print.h"
Go to the source code of this file.
Classes | |
struct | task |
struct | workerpool |
Macros | |
#define | __USE_GNU |
#define | _GNU_SOURCE |
Functions | |
void * | worker_thread (void *p) |
void | workerpool_add_task (workerpool_t *wp, void(*f)(void *p), void *p) |
workerpool_t * | workerpool_create (int nthreads) |
void | workerpool_destroy (workerpool_t *wp) |
int | workerpool_get_nprocs () |
int | workerpool_get_nthreads (workerpool_t *wp) |
void | workerpool_run (workerpool_t *wp) |
void | workerpool_run_single (workerpool_t *wp) |
#define __USE_GNU |
Definition at line 30 of file workerpool.c.
#define _GNU_SOURCE |
Definition at line 29 of file workerpool.c.
void* worker_thread | ( | void * | p | ) |
Definition at line 65 of file workerpool.c.
void workerpool_add_task | ( | workerpool_t * | wp, |
void(*)(void *p) | f, | ||
void * | p | ||
) |
Definition at line 161 of file workerpool.c.
workerpool_t* workerpool_create | ( | int | nthreads | ) |
Definition at line 101 of file workerpool.c.
void workerpool_destroy | ( | workerpool_t * | wp | ) |
Definition at line 129 of file workerpool.c.
int workerpool_get_nprocs | ( | ) |
Definition at line 206 of file workerpool.c.
int workerpool_get_nthreads | ( | workerpool_t * | wp | ) |
Definition at line 156 of file workerpool.c.
void workerpool_run | ( | workerpool_t * | wp | ) |
Definition at line 182 of file workerpool.c.
void workerpool_run_single | ( | workerpool_t * | wp | ) |
Definition at line 170 of file workerpool.c.