Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
|
A wrapper around the platform's threading system. More...
#include <Thread.h>
Public Member Functions | |
GTS_INLINE bool | start (ThreadFunction function, void *pArg, uint32_t stackSize=DEFAULT_STACK_SIZE) |
Starts a thread. | |
GTS_INLINE bool | join () |
GTS_INLINE bool | destroy () |
Destroys the internal resource, if any. | |
GTS_INLINE ThreadId | getId () |
Returns the handle's unique ID. | |
GTS_INLINE bool | setAffinity (size_t groupId, AffinitySet const &affinity) |
Sets the processor affinity for the thread and returns the previous affinity. | |
GTS_INLINE bool | setPriority (Priority priority) |
Sets the priority for the thread. | |
Static Public Member Functions | |
static GTS_INLINE void | getSystemTopology (SystemTopology &out) |
Gets the topology of all the processors in the system. | |
static GTS_INLINE uint32_t | getHardwareThreadCount () |
Gets the number of logical processor on this system. | |
static GTS_INLINE void | getCurrentProcessorId (uint32_t &groupId, uint32_t &hwTid) |
Gets the current group and hardware thread IDs. | |
A wrapper around the platform's threading system.