21 INLINE ThreadPosixImpl::
22 ThreadPosixImpl(
Thread *parent_obj) :
23 _parent_obj(parent_obj)
35 INLINE
void ThreadPosixImpl::
44 INLINE
void ThreadPosixImpl::
53 INLINE
Thread *ThreadPosixImpl::
54 get_current_thread() {
55 TAU_PROFILE(
"Thread *ThreadPosixImpl::get_current_thread()",
" ", TAU_USER);
56 if (!_got_pt_ptr_index) {
59 return (
Thread *)pthread_getspecific(_pt_ptr_index);
69 INLINE
void ThreadPosixImpl::
70 bind_thread(
Thread *thread) {
71 if (!_got_pt_ptr_index) {
74 int result = pthread_setspecific(_pt_ptr_index, thread);
75 nassertv(result == 0);
83 INLINE
bool ThreadPosixImpl::
84 is_threading_supported() {
93 INLINE
bool ThreadPosixImpl::
103 INLINE
bool ThreadPosixImpl::
104 is_simple_threads() {
113 INLINE
void ThreadPosixImpl::
114 sleep(
double seconds) {
115 TAU_PROFILE(
"void ThreadPosixImpl::sleep(double)",
" ", TAU_USER);
116 struct timespec rqtp;
117 rqtp.tv_sec = time_t(seconds);
118 rqtp.tv_nsec = long((seconds - (
double)rqtp.tv_sec) * 1000000000.0);
119 nanosleep(&rqtp, NULL);
127 INLINE
void ThreadPosixImpl::
137 INLINE
void ThreadPosixImpl::
A thread; that is, a lightweight process.