I've missed a couple of updates. NFC.
llvm-svn: 292109
thread::~thread()
{
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
terminate();
}
thread::join()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_join(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)
thread::detach()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_detach(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)