]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/windows/thread.cpp
Move most platform-specific code into overlay directories
[libs/core.git] / source / core / windows / thread.cpp
diff --git a/source/core/windows/thread.cpp b/source/core/windows/thread.cpp
new file mode 100644 (file)
index 0000000..410141c
--- /dev/null
@@ -0,0 +1,25 @@
+#include <windows.h>
+#include "thread.h"
+#include "thread_private.h"
+
+using namespace std;
+
+namespace Msp {
+
+void Thread::platform_join()
+{
+       WaitForSingleObject(priv_->handle, INFINITE);
+}
+
+void Thread::platform_kill()
+{
+       TerminateThread(priv_->handle, 0);
+}
+
+void Thread::platform_launch()
+{
+       DWORD dummy;  // Win9x needs the lpTthreadId parameter
+       priv_->handle = CreateThread(0, 0, &Private::main_wrapper, this, 0, &dummy);
+}
+
+} // namespace Msp