commit
a808e435b7
@ -521,7 +521,7 @@ class Thread {
|
|||||||
virtual ~Thread() {}
|
virtual ~Thread() {}
|
||||||
|
|
||||||
void SetJoinable(bool) {}
|
void SetJoinable(bool) {}
|
||||||
#if defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
|
||||||
void Start() {
|
void Start() {
|
||||||
handle_ = CreateThread(NULL,
|
handle_ = CreateThread(NULL,
|
||||||
0,
|
0,
|
||||||
@ -554,7 +554,7 @@ class Thread {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
|
||||||
HANDLE handle_;
|
HANDLE handle_;
|
||||||
DWORD th_;
|
DWORD th_;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -268,7 +268,7 @@ pid_t GetTID() {
|
|||||||
// If gettid() could not be used, we use one of the following.
|
// If gettid() could not be used, we use one of the following.
|
||||||
#if defined OS_LINUX
|
#if defined OS_LINUX
|
||||||
return getpid(); // Linux: getpid returns thread ID when gettid is absent
|
return getpid(); // Linux: getpid returns thread ID when gettid is absent
|
||||||
#elif defined OS_WINDOWS || defined OS_CYGWIN
|
#elif defined OS_WINDOWS && !defined OS_CYGWIN
|
||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
#else
|
#else
|
||||||
// If none of the techniques above worked, we use pthread_self().
|
// If none of the techniques above worked, we use pthread_self().
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user