|
libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
| struct | GblThreadClass |
| struct | GblThread |
Macros | |
Type System | |
Type UUID and cast operators | |
| #define | GBL_THREAD_TYPE |
| #define | GBL_THREAD(self) |
| #define | GBL_THREAD_CLASS(klass) |
| #define | GBL_THREAD_GET_CLASS(self) |
Function Overload Macros | |
Macros providing default arguments for methods | |
| #define | GblThread_foreach(...) |
Typedefs | |
| typedef GBL_RESULT(* | GblThreadFn) (GblThread *pSelf) |
| typedef GblBool(* | GblThreadIterFn) (GblThread *pSelf, void *pClosure) |
| typedef uintptr_t | GblThreadAffinity |
| typedef GblEnum | GBL_THREAD_PRIORITY |
| typedef GblEnum | GBL_THREAD_STATE |
Enumerations | |
| enum | GBL_THREAD_PRIORITY |
| enum | GBL_THREAD_STATE |
Functions | |
Static Methods | |
Searching, iterating, counting, etc. | |
| GblType | GblThread_type (void) |
| size_t | GblThread_count (void) |
| GblThread * | GblThread_find (const char *pName) |
| GblBool | GblThread_foreach (GblThreadIterFn pIt, void *pCl) |
GblThread and lowest-level concurrency managment.
This file contains the API and public structures for GblThread, the lowest-level construct for concurrent task execution, directly mapping to an OS-level thread. The API is backed by either C11 threads, POSIX pthreads, or Win32 threads, depending on the platform.
Definition in file gimbal_thread.h.
| #define GBL_THREAD_TYPE |
Type UUID for GblThread.
Definition at line 36 of file gimbal_thread.h.
| #define GBL_THREAD | ( | self | ) |
Function-style GblInstance cast.
Definition at line 37 of file gimbal_thread.h.
| #define GBL_THREAD_CLASS | ( | klass | ) |
Function-style GblClass cast.
Definition at line 38 of file gimbal_thread.h.
| #define GBL_THREAD_GET_CLASS | ( | self | ) |
Get GblThreadClass from GblInstance.
Definition at line 39 of file gimbal_thread.h.
| #define GblThread_foreach | ( | ... | ) |
Provides default argument handling for GblThread_foreach()
Definition at line 214 of file gimbal_thread.h.
| typedef GBL_RESULT(* GblThreadFn) (GblThread *pSelf) |
Function callback type to be used as the main thread's callback with GblThread_setCallback().
Definition at line 50 of file gimbal_thread.h.
Iterator function type to be used with GblThread_foreach()
Definition at line 52 of file gimbal_thread.h.
| typedef uintptr_t GblThreadAffinity |
Represents a CPU affinity bitmask, with each bit being affinity to a single core.
Definition at line 54 of file gimbal_thread.h.
| typedef GblEnum GBL_THREAD_PRIORITY |
Priority levels for GblThread.
Definition at line 57 of file gimbal_thread.h.
| typedef GblEnum GBL_THREAD_STATE |
Lifetime states for a GblThread.
Definition at line 65 of file gimbal_thread.h.
| enum GBL_THREAD_PRIORITY |
| Enumerator | |
|---|---|
| GBL_THREAD_PRIORITY_LOW | Lowest. |
| GBL_THREAD_PRIORITY_MEDIUM | Medium. |
| GBL_THREAD_PRIORITY_HIGH | High. |
| GBL_THREAD_PRIORITY_REAL_TIME | Highest. |
Definition at line 57 of file gimbal_thread.h.
| enum GBL_THREAD_STATE |
Definition at line 65 of file gimbal_thread.h.
| size_t GblThread_count | ( | void | ) |
Returns the current number of live threads (not necessarily all active)
| GblThread * GblThread_find | ( | const char * | pName | ) |
Searches (linearly) for a thread with the string name given by pName.
| GblBool GblThread_foreach | ( | GblThreadIterFn | pIt, |
| void * | pCl ) |
Iterates over all live threads, passing each thread and pCl back to the pIt callback.