Commit c52d902d authored by Samuel Debionne's avatar Samuel Debionne

Add Windows port for GetThreadID().

parent 3cf31507
Pipeline #2998 passed with stages
in 1 minute and 38 seconds
......@@ -28,6 +28,11 @@
#include <bitset>
#include <queue>
#if defined(_WIN32)
#include <WinBase.h>
#define pid_t DWORD
#endif
namespace lima
{
......
......@@ -29,7 +29,10 @@
#include <time_compat.h>
#endif
#include <unistd.h>
#if !defined(_WIN32)
#include <sys/syscall.h>
#endif
using namespace lima;
......@@ -219,7 +222,13 @@ void Cond::broadcast()
}
pid_t lima::GetThreadID() {
#if defined(_WIN32)
return GetCurrentThreadId();
Please register or sign in to reply
#else
return syscall(SYS_gettid);
#endif
}
Thread::ExceptionCleanUp::ExceptionCleanUp(Thread& thread)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment