X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fthread.cpp;fp=source%2Fcore%2Fwindows%2Fthread.cpp;h=410141cfb9e82626f957e6aecf6ee2fbbfc936ad;hp=0000000000000000000000000000000000000000;hb=609c9a508cfdc7b42c46c4f21d17639204165a00;hpb=b4806214e905752617691f851717033fd3f266c2 diff --git a/source/core/windows/thread.cpp b/source/core/windows/thread.cpp new file mode 100644 index 0000000..410141c --- /dev/null +++ b/source/core/windows/thread.cpp @@ -0,0 +1,25 @@ +#include +#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