9 #include "../arm/thread_context.h"
Thread context structure (register dump)
Definition: thread_context.h:49
Thread information structure.
Definition: thread.h:13
bool owns_stack_mem
Whether the stack memory is automatically allocated.
Definition: thread.h:15
Handle handle
Thread handle.
Definition: thread.h:14
size_t stack_sz
Stack size.
Definition: thread.h:18
void * stack_mem
Pointer to stack memory.
Definition: thread.h:16
void * stack_mirror
Pointer to stack memory mirror.
Definition: thread.h:17
Waiter structure, representing any generic waitable synchronization object; both kernel-mode and user...
Definition: wait.h:36
Result threadClose(Thread *t)
Frees up resources associated with a thread.
Result threadCreate(Thread *t, ThreadFunc entry, void *arg, void *stack_mem, size_t stack_sz, int prio, int cpuid)
Creates a thread.
Result threadStart(Thread *t)
Starts the execution of a thread.
void threadExit(void)
Exits the current thread immediately.
static Waiter waiterForThread(Thread *t)
Creates a Waiter for a Thread.
Definition: thread.h:25
Result threadResume(Thread *t)
Resumes the execution of a thread, after having been paused.
void threadTlsSet(s32 slot_id, void *value)
Stores the specified value into a TLS slot.
void threadTlsFree(s32 slot_id)
Frees a TLS slot.
s32 threadTlsAlloc(void(*destructor)(void *))
Allocates a TLS slot.
Result threadDumpContext(ThreadContext *ctx, Thread *t)
Dumps the registers of a thread paused by threadPause (register groups: all).
Result threadPause(Thread *t)
Pauses the execution of a thread.
void * threadTlsGet(s32 slot_id)
Retrieves the value stored in a TLS slot.
Handle threadGetCurHandle(void)
Gets the raw handle to the current thread.
Thread * threadGetSelf(void)
Gets a pointer to the current thread structure.
Result threadWaitForExit(Thread *t)
Waits for a thread to finish executing.
void(* ThreadFunc)(void *)
Thread entrypoint function.
Definition: types.h:45
u32 Handle
Kernel object handle.
Definition: types.h:43
u32 Result
Function error code result type.
Definition: types.h:44
#define NX_NORETURN
Marks a function as not returning, for the purposes of compiler optimization.
Definition: types.h:68
int32_t s32
32-bit signed integer.
Definition: types.h:27
User mode synchronization primitive waiting operations.
static Waiter waiterForHandle(Handle h)
Creates a Waiter for a kernel-mode Handle.
Definition: wait.h:46