mirror of
https://github.com/simon987/sist2.git
synced 2025-12-13 23:39:04 +00:00
Initial commit (squashed)
This commit is contained in:
19
src/tpool.h
Normal file
19
src/tpool.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef SIST2_TPOOL_H
|
||||
#define SIST2_TPOOL_H
|
||||
|
||||
#include "sist.h"
|
||||
|
||||
struct tpool;
|
||||
typedef struct tpool tpool_t;
|
||||
|
||||
typedef void (*thread_func_t)(void *arg);
|
||||
|
||||
tpool_t *tpool_create(size_t num, void (*cleanup_func)());
|
||||
void tpool_destroy(tpool_t *tm);
|
||||
|
||||
int tpool_add_work(tpool_t *pool, thread_func_t func, void *arg);
|
||||
void tpool_wait(tpool_t *tm);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user