Go to the documentation of this file.
10 #include <processthreadsapi.h>
15 #if defined(EHS_OS_WINDOWS)
16 #define EHS_INVALID_THREAD nullptr
17 typedef void* THandle;
18 #elif defined(EHS_OS_LINUX)
19 #define EHS_INVALID_THREAD 0
20 typedef UInt_64 THandle;
29 static Handle mainTaskHdl;
47 Thread(
const UInt_64 stackSize = 0);
61 void Start(
UInt_32 (*cb)(
void*),
void* args);
73 UInt_64 GetStackSize()
const;
77 THandle GetHandle()
const;
85 bool IsCurrent()
const;
93 void SetTaskType_32(
const Str_32& task);
98 void SetTaskType_16(
const Str_16& task);
103 void SetTaskType_8(
const Str_8& task);
105 void RevertTaskType();
113 static UInt_64 GetCurrentId();
115 #ifdef EHS_OS_WINDOWS
119 static void SetMainTaskType_32(
const Str_32& task);
124 static void SetMainTaskType_16(
const Str_16& task);
129 static void SetMainTaskType_8(
const Str_8& task);
131 static void RevertMainTaskType();
138 static float HardSleepFor(
const float seconds);
143 static void SleepFor(
const UInt_32 miliseconds);
146 static void* Redirect(
void* args);
#define EHS_INFINITE
Definition: Types.h:35
unsigned int UInt_32
Definition: Types.h:49