- friend bool
- operator<(thread::id __x, thread::id __y)
- { return __x._M_thread_id < __y._M_thread_id; }
-
- template<class _CharT, class _Traits>
- friend basic_ostream<_CharT, _Traits>&
- operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id);
-
- explicit
- id(__gthread_t __id)
- : _M_thread_id(__id)
- { }
-
- __gthread_t _M_thread_id;
- };
-
- inline bool
- operator!=(thread::id __x, thread::id __y)
- { return !(__x == __y); }
-
- inline bool
- operator<=(thread::id __x, thread::id __y)
- { return !(__y < __x); }
-
- inline bool
- operator>(thread::id __x, thread::id __y)
- { return __y < __x; }
-
- inline bool
- operator>=(thread::id __x, thread::id __y)
- { return !(__x < __y); }
-
- template<class _CharT, class _Traits>
- inline basic_ostream<_CharT, _Traits>&
- operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id)
- {
- if(__id == thread::id())
- return __out << "non-executing thread";
- else
- return __out << __id._M_thread_id;
- }
-
- inline thread::id
- thread::get_id() const
- {
- if(_M_thread_data)
- return thread::id(_M_thread_data->_M_thread_handle);
- else
- return thread::id();