Home | History | Annotate | Download | only in unix

Lines Matching defs:Thread

2  * drawElements Thread Library
21 * \brief Unix implementation of thread management.
53 pthread_t thread;
56 } Thread;
58 DE_STATIC_ASSERT(sizeof(deThread) >= sizeof(Thread*));
62 Thread* thread = (Thread*)entryPtr;
63 deThreadFunc func = thread->func;
64 void* arg = thread->arg;
66 /* Start actual thread. */
75 Thread* thread = (Thread*)deCalloc(sizeof(Thread));
77 if (!thread)
80 thread->func = func;
81 thread->arg = arg;
85 deFree(thread);
95 deFree(thread);
99 if (pthread_create(&thread->thread, &attr, startThread, thread) != 0)
102 deFree(thread);
105 DE_ASSERT(thread->thread);
109 return (deThread)thread;
114 Thread* thread = (Thread*)threadptr;
117 DE_ASSERT(thread->thread);
118 ret = pthread_join(thread->thread, DE_NULL);
122 pthread_detach(thread->thread);
124 /* Thread is no longer valid as far as we are concerned. */
125 thread->thread = 0;
132 Thread* thread = (Thread*)threadptr;
134 if (thread->thread)
137 int ret = pthread_detach(thread->thread);
142 deFree(thread);