X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fthread.cpp;h=8890a70fb1cbd0eaff8cf32cdea008950c92e43b;hb=HEAD;hp=410141cfb9e82626f957e6aecf6ee2fbbfc936ad;hpb=609c9a508cfdc7b42c46c4f21d17639204165a00;p=libs%2Fcore.git diff --git a/source/core/windows/thread.cpp b/source/core/windows/thread.cpp index 410141c..3231896 100644 --- a/source/core/windows/thread.cpp +++ b/source/core/windows/thread.cpp @@ -1,25 +1,28 @@ -#include +#include "winapi.h" #include "thread.h" #include "thread_private.h" -using namespace std; - 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