Memclave Artifact Documentation
Loading...
Searching...
No Matches
vud_pool.h
Go to the documentation of this file.
1#ifndef VUD_POOL_H
2#define VUD_POOL_H
3
4#include <pthread.h>
5#include <stdbool.h>
6
13typedef void (*vud_pool_worker)(unsigned id, unsigned nr_worker, void* arg);
14
16typedef struct vud_pool vud_pool;
17
27vud_pool* vud_pool_init(unsigned n_worker);
28
35void vud_pool_do(vud_pool* pool, vud_pool_worker worker, void* arg);
36
41
42#endif
struct vud_pool vud_pool
Definition vud_pool.h:16
void(* vud_pool_worker)(unsigned id, unsigned nr_worker, void *arg)
called once per pool_do call for each worker
Definition vud_pool.h:13
void vud_pool_do(vud_pool *pool, vud_pool_worker worker, void *arg)
perform an operation on all workers of the pool
vud_pool * vud_pool_init(unsigned n_worker)
create a new thread pool
void vud_pool_free(vud_pool *pool)
free up all resources (including threads and locks) used for the pool