X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fthread.cpp;h=8890a70fb1cbd0eaff8cf32cdea008950c92e43b;hb=HEAD;hp=7c436183d4f279cdc2a034053041fb5c5b96ad1d;hpb=b537410dcd5b7e661625b51ee72b15e40045fd18;p=libs%2Fcore.git diff --git a/source/core/windows/thread.cpp b/source/core/windows/thread.cpp index 7c43618..3231896 100644 --- a/source/core/windows/thread.cpp +++ b/source/core/windows/thread.cpp @@ -1,4 +1,4 @@ -#include +#include "winapi.h" #include "thread.h" #include "thread_private.h" @@ -6,18 +6,23 @@ namespace Msp { void Thread::platform_join() { - WaitForSingleObject(priv_->handle, INFINITE); + WaitForSingleObject(_priv->handle, INFINITE); } void Thread::platform_kill() { - TerminateThread(priv_->handle, 0); + 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); + _priv->handle = CreateThread(nullptr, 0, &Private::main_wrapper, this, 0, &dummy); +} + +void Thread::platform_setname() +{ + // TODO: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx } } // namespace Msp