23 lines
804 B
C
23 lines
804 B
C
|
/******************************************************************************/
|
||
|
/* SlunkCrypt, by LoRd_MuldeR <MuldeR2@GMX.de> */
|
||
|
/* This work has been released under the CC0 1.0 Universal license! */
|
||
|
/******************************************************************************/
|
||
|
|
||
|
#ifndef INC_SLUNKCRYPT_THREAD_H
|
||
|
#define INC_SLUNKCRYPT_THREAD_H
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#define MAX_THREADS 8U
|
||
|
#define THRDPL_NULL ((thrdpl_t)NULL)
|
||
|
|
||
|
typedef void (*thrdpl_worker_t)(void *arguments);
|
||
|
typedef uintptr_t thrdpl_t;
|
||
|
|
||
|
thrdpl_t thrdpl_create(const size_t count);
|
||
|
void thrdpl_submit(const thrdpl_t thrdpl, const thrdpl_worker_t worker, void *const arguments);
|
||
|
void thrdpl_await(const thrdpl_t thrdpl);
|
||
|
void thrdpl_destroy(const thrdpl_t thrdpl);
|
||
|
|
||
|
#endif
|