CX/include/cx_thread.h
Marcel Plch c2b9dfdd29
Memory management tweaks
There are no memory leaks,
yet, I discover, with my steady course,
thru my small valgrind peeks,
that nvidia are a bunch of stupid a-holes.
2024-11-11 17:42:57 +01:00

20 lines
412 B
C

#ifndef CX_THREAD_H
#define CX_THREAD_H
typedef struct _cx_thrd {
pthread_t thread;
void *ctx; // Arbitrary thread context
} CX_Thread;
typedef struct _cx_thrgr {
CX_Thread *group_manager;
CX_Thread **workers;
size_t worker_count;
size_t worker_size;
} CX_ThreadGroup;
CX_ThreadGroup *cx_threadGroup_new(void *(*)(void *), void *);
void cx_threadGroup_free(CX_ThreadGroup *);
#endif