summaryrefslogtreecommitdiff
path: root/include/thread
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-05-24 17:49:41 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-05-24 17:49:41 +0000
commitadff4895b2746f30b271bc219713e7ded5ae9677 (patch)
treeeea5109bb84c360697db8872cb0edc4739c309d3 /include/thread
parent2a59254a44563109cb54cc46755552b17bd88336 (diff)
downloadlibcxx-adff4895b2746f30b271bc219713e7ded5ae9677.tar.gz
patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/thread')
-rw-r--r--include/thread5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/thread b/include/thread
index 3c1cf99fc..16faed938 100644
--- a/include/thread
+++ b/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_;}