diff options
author | <shinichiro.hamaji@gmail.com> | 2009-07-31 05:25:27 +0000 |
---|---|---|
committer | <shinichiro.hamaji@gmail.com> | 2009-07-31 05:25:27 +0000 |
commit | 7e54f5ab1102637dca67feaf63a74bc35dababdd (patch) | |
tree | f0e7eeb989ae9fbe357b8b7d75a21629ae63a227 | |
parent | 1b5a90b691cc9a7dce4a79c0736b6c37ea065108 (diff) | |
download | glog-7e54f5ab1102637dca67feaf63a74bc35dababdd.tar.gz glog-7e54f5ab1102637dca67feaf63a74bc35dababdd.tar.bz2 glog-7e54f5ab1102637dca67feaf63a74bc35dababdd.zip |
Make the order of check for OS_WINDOWS|OS_CYGWIN and HAVE_PTHREAD consistent.
git-svn-id: https://google-glog.googlecode.com/svn/trunk@70 eb4d4688-79bd-11dd-afb4-1d65580434c0
-rw-r--r-- | src/googletest.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/googletest.h b/src/googletest.h index ca5567e..c1df14e 100644 --- a/src/googletest.h +++ b/src/googletest.h @@ -528,14 +528,7 @@ class Thread { virtual ~Thread() {} void SetJoinable(bool joinable) {} -#if defined(HAVE_PTHREAD) - void Start() { - pthread_create(&th_, NULL, &Thread::InvokeThread, this); - } - void Join() { - pthread_join(th_, NULL); - } -#elif defined(OS_WINDOWS) || defined(OS_CYGWIN) +#if defined(OS_WINDOWS) || defined(OS_CYGWIN) void Start() { handle_ = CreateThread(NULL, 0, @@ -548,6 +541,13 @@ class Thread { void Join() { WaitForSingleObject(handle_, INFINITE); } +#elif defined(HAVE_PTHREAD) + void Start() { + pthread_create(&th_, NULL, &Thread::InvokeThread, this); + } + void Join() { + pthread_join(th_, NULL); + } #else # error No thread implementation. #endif |