7#if defined(__cplusplus)
48#define PRIORITY_MAX 63
49#define PRIORITY_MAX_USER 31
102#define PAGE_SIZE 0x1000
110#define BYTES_TO_PAGES(amount) (((amount) + PAGE_SIZE - 1) / PAGE_SIZE)
118#define PAGE_SIZE_OF(object) BYTES_TO_PAGES(sizeof(object))
206#define FUTEX_ALL UINT64_MAX
255#if defined(__cplusplus)
futex_op_t
Futex operation enum.
tid_t gettid(void)
System call to retrieve the current tid.
void * mmap(fd_t fd, void *address, uint64_t length, prot_t prot)
System call to map memory from a file.
uint64_t futex(atomic_uint64_t *addr, uint64_t val, futex_op_t op, clock_t timeout)
System call for fast user space mutual exclusion.
spawn_flags_t
Spawn behaviour flags.
pid_t spawn(const char **argv, spawn_flags_t flags)
System call for spawning new processes.
char ** environ
The environment variables of the current process.
clock_t uptime(void)
System call for retreving the time since boot.
prot_t
Memory protection flags.
void * mprotect(void *address, uint64_t length, prot_t prot)
System call to change the protection flags of memory.
pid_t getpid(void)
System call to retrieve the current pid.
uint8_t priority_t
Priority type.
void * munmap(void *address, uint64_t length)
System call to unmap mapped memory.
uint64_t nanosleep(clock_t timeout)
System call for sleeping.
@ FUTEX_WAKE
Wake up one or more threads waiting on the futex.
@ FUTEX_WAIT
Wait until the timeout expires or the futex value changes.
@ SPAWN_EMPTY_FDS
Dont inherit the file descriptors of the parent process.
@ SPAWN_DEFAULT
Default spawn behaviour.
@ SPAWN_STDIO_FDS
Only inherit stdin, stdout and stderr from the parent process.
@ SPAWN_EMPTY_NS
Dont inherit the mountpoints of the parent's namespace.
@ SPAWN_EMPTY_ENV
Don't inherit the parent's environment variables.
@ SPAWN_EMPTY_CWD
Don't inherit the parent's current working directory, starts at root (/).
@ PROT_READ
Readable memory.
@ PROT_EXECUTE
Executable memory.
@ PROT_WRITE
Writable memory.
@ PROT_NONE
Invalid memory, cannot be accessed.
__UINT64_TYPE__ tid_t
Thread Identifier.
__UINT64_TYPE__ fd_t
A file descriptor.
__UINT64_TYPE__ pid_t
Process Identifier.
__UINT64_TYPE__ clock_t
A nanosecond time.
static uintptr_t address
Mapped virtual address of the HPET registers.
static const path_flag_t flags[]
atomic_uint64_t value
The value of the sync object.