libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_thread_.h
1#ifndef GIMBAL_THREAD__H
2#define GIMBAL_THREAD__H
3
4#include "../core/gimbal_thread.h"
5
6#define GBL_SELF_TYPE uintptr_t
7
8typedef uintptr_t GblThreadId;
9
10GBL_EXPORT GblThreadId GblThread__current (void) GBL_NOEXCEPT;
11
12GBL_EXPORT GblThreadId GblThread__create (GblThreadFn pFnRun, size_t stackSz) GBL_NOEXCEPT;
13GBL_EXPORT GBL_RESULT GblThread__destroy (GBL_VSELF) GBL_NOEXCEPT;
14
15GBL_EXPORT const char* GblThread__name (GBL_VSELF) GBL_NOEXCEPT;
16GBL_EXPORT GBL_RESULT GblThread__setName (GBL_VSELF, const char* pName) GBL_NOEXCEPT;
17
19 GblThread__priority (GBL_VSELF) GBL_NOEXCEPT;
20GBL_EXPORT GBL_RESULT GblThread__setPriority (GBL_VSELF, GBL_THREAD_PRIORITY prio) GBL_NOEXCEPT;
21
23 GblThread__affinity (GBL_VSELF) GBL_NOEXCEPT;
24GBL_EXPORT GBL_RESULT GblThread__setAffinity (GBL_VSELF, GblThreadAffinity affin) GBL_NOEXCEPT;
25
26
27#endif // GIMBAL_THREAD__H
#define GBL_NOEXCEPT
#define GBL_EXPORT
#define GBL_VSELF
GBL_THREAD_PRIORITY
uintptr_t GblThreadAffinity
Represents a CPU affinity bitmask, with each bit being affinity to a single core.