libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
thread.h File Reference
#include <clod/lib.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  clod_process_opts

Macros

#define CLOD_SPINLOCK_INIT   0
#define CLOD_ONCE_INIT   0
#define CLOD_ONCE(once)
#define CLOD_MUTEX_INIT   0

Typedefs

typedef int clod_process_main(int argc, char **argv)
typedef uintptr_t clod_process
typedef char clod_spinlock
typedef char clod_once
typedef int clod_mutex

Enumerations

enum  clod_process_type { CLOD_THREAD = 1 , CLOD_THREAD_BACKGROUND = 2 , CLOD_DAEMON = 3 }
enum  clod_process_result { CLOD_PROCESS_OK = 0 , CLOD_PROCESS_INVALID = 1 , CLOD_PROCESS_NO_MEMORY = 2 , CLOD_PROCESS_UNSUPPORTED = 3 }

Functions

enum clod_process_result clod_process_start (struct clod_process_opts *opts, clod_process *process_out)
enum clod_process_result clod_process_join (clod_process process)
void clod_spinlock_lock (clod_spinlock *spinlock)
void clod_spinlock_unlock (clod_spinlock *spinlock)
bool clod_once_do (clod_once *once)
void clod_once_done (clod_once *once)
int64_t clod_timer (int64_t *time, int64_t duration_us)
void clod_mutex_lock (clod_mutex *mutex)
void clod_mutex_unlock (clod_mutex *mutex)