diff options
Diffstat (limited to 'linen.h')
-rw-r--r-- | linen.h | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -5,9 +5,28 @@ #error "Linen (libinen.so) only works on x86_64 Linux!" #endif -typedef int* linen_thread_t; +#include <stdint.h> + + +typedef struct { + uint32_t futex; + uint32_t magic; +} *linen_thread_t; extern int linen_thread_create(linen_thread_t* handle, void* (*func)(void*), void* arg); extern int linen_thread_finish(linen_thread_t handle, void** retval); + +typedef struct { + uint32_t futex; + uint32_t count; + uint32_t magic; +} linen_lock_t; + +#define LINEN_LOCK_INITIALIZER { 0, 0, 0xCAFEBABE } + +extern int linen_lock_acquire(linen_lock_t* handle); +extern int linen_lock_release(linen_lock_t* handle); + + #endif /* _LINEN_H_ */ |