ciabatta/include/threads.h

22 lines
398 B
C
Raw Normal View History

2023-08-15 08:54:02 +00:00
#pragma once
typedef int (*thrd_start_t)(void *);
struct thrd_t typedef thrd_t;
struct thrd_t {
_RT_Thread thread;
};
enum {
thrd_success = 0,
thrd_nomem = -1,
thrd_timedout = -2,
thrd_busy = -3,
thrd_error = -4
};
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg);
2023-09-06 09:37:30 +00:00
int thrd_join(thrd_t thr, int *out_exit_code);
2023-09-11 11:44:06 +00:00
int thrd_detach(thrd_t thr);
void thrd_yield();