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
This commit is contained in:
@@ -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_;}
|
||||
|
Reference in New Issue
Block a user