summaryrefslogtreecommitdiff
path: root/Runtime/Threads/ThreadHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Threads/ThreadHelper.h')
-rw-r--r--Runtime/Threads/ThreadHelper.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/Runtime/Threads/ThreadHelper.h b/Runtime/Threads/ThreadHelper.h
new file mode 100644
index 0000000..3e21538
--- /dev/null
+++ b/Runtime/Threads/ThreadHelper.h
@@ -0,0 +1,30 @@
+#ifndef THREADHELPER_H
+#define THREADHELPER_H
+
+#if SUPPORT_THREADS
+
+#include "Thread.h"
+
+// ThreadHelper is typically implemented on a per-platform basis, as it contains OS
+// specific functionality outside regular POSIX / pthread / WinAPI threads.
+
+class ThreadHelper
+{
+ friend class Thread;
+ friend class PlatformThread;
+
+protected:
+ static void Sleep(double time);
+
+ static void SetThreadName(const Thread* thread);
+ static void SetThreadProcessor(const Thread* thread, int processor);
+
+ static double GetThreadRunningTime(Thread::ThreadID thread);
+
+private:
+ ThreadHelper();
+};
+
+#endif //SUPPORT_THREADS
+
+#endif