diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:52 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 18:24:51 -0500 |
commit | f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch) | |
tree | 93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/options/ansi/include/threads.h | |
parent | bd5969fc876a10b18613302db7087ef3c40f18e1 (diff) |
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/ansi/include/threads.h')
-rw-r--r-- | lib/mlibc/options/ansi/include/threads.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/lib/mlibc/options/ansi/include/threads.h b/lib/mlibc/options/ansi/include/threads.h deleted file mode 100644 index f96abcd..0000000 --- a/lib/mlibc/options/ansi/include/threads.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _THREADS_H -#define _THREADS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <bits/threads.h> - -enum { - mtx_plain, - mtx_recursive, - mtx_timed, -}; - -enum { - thrd_success, - thrd_timedout, - thrd_busy, - thrd_error, - thrd_nomem, -}; - -typedef struct __mlibc_thread_data *thrd_t; -typedef struct __mlibc_mutex mtx_t; -typedef struct __mlibc_cond cnd_t; -#ifndef __cplusplus -#define thread_local _Thread_local -#endif - -typedef int (*thrd_start_t)(void*); - -#ifndef __MLIBC_ABI_ONLY - -int thrd_create(thrd_t *thr, thrd_start_t func, void *arg); -int thrd_equal(thrd_t lhs, thrd_t rhs); -thrd_t thrd_current(void); -int thrd_sleep(const struct timespec *duration, struct timespec *remaining); -void thrd_yield(void); -int thrd_detach(thrd_t thr); -int thrd_join(thrd_t thr, int *res); -__attribute__((__noreturn__)) void thrd_exit(int res); - -int mtx_init(mtx_t *mtx, int type); -void mtx_destroy(mtx_t *mtx); -int mtx_lock(mtx_t *mtx); -int mtx_unlock(mtx_t *mtx); - -int cnd_init(cnd_t *cond); -void cnd_destroy(cnd_t *cond); -int cnd_broadcast(cnd_t *cond); -int cnd_wait(cnd_t *cond, mtx_t *mtx); - -#endif /* !__MLIBC_ABI_ONLY */ - -#ifdef __cplusplus -} -#endif - -#endif /* _THREADS_H */ - |