summaryrefslogtreecommitdiffstats
path: root/libcxx/include/thread
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/thread')
-rw-r--r--libcxx/include/thread5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/include/thread b/libcxx/include/thread
index 3c1cf99fc9c..16faed9380d 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -115,6 +115,9 @@ __thread_id get_id();
class __thread_id
{
+ // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
+ // NULL is the no-thread value on Darwin. Someone needs to check
+ // on other platforms. We assume 0 works everywhere for now.
pthread_t __id_;
public:
@@ -206,7 +209,7 @@ public:
void swap(thread& __t) {_STD::swap(__t_, __t.__t_);}
- bool joinable() const {return __t_ != nullptr;}
+ bool joinable() const {return __t_ != 0;}
void join();
void detach();
id get_id() const {return __t_;}
OpenPOWER on IntegriCloud