]> git.tdb.fi Git - libs/core.git/blob - source/core/windows/thread.cpp
Miscellaneous fixes
[libs/core.git] / source / core / windows / thread.cpp
1 #include <windows.h>
2 #include "thread.h"
3 #include "thread_private.h"
4
5 namespace Msp {
6
7 void Thread::platform_join()
8 {
9         WaitForSingleObject(priv_->handle, INFINITE);
10 }
11
12 void Thread::platform_kill()
13 {
14         TerminateThread(priv_->handle, 0);
15 }
16
17 void Thread::platform_launch()
18 {
19         DWORD dummy;  // Win9x needs the lpTthreadId parameter
20         priv_->handle = CreateThread(0, 0, &Private::main_wrapper, this, 0, &dummy);
21 }
22
23 } // namespace Msp