#ifndef _LINEN_H_ #define _LINEN_H_ #if (__x86_64 != 1 || __linux__ != 1 || __LP64__ != 1) #error "Linen (libinen.so) only works on x86_64 Linux!" #endif #include 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_ */