Lines Matching defs:thread
2 * drawElements Thread Library
21 * \brief Unix implementation of thread management.
40 pthread_t thread;
43 } Thread;
45 DE_STATIC_ASSERT(sizeof(deThread) >= sizeof(Thread*));
49 Thread* thread = (Thread*)entryPtr;
50 deThreadFunc func = thread->func;
51 void* arg = thread->arg;
53 /* Start actual thread. */
62 Thread* thread = (Thread*)deCalloc(sizeof(Thread));
64 if (!thread)
67 thread->func = func;
68 thread->arg = arg;
72 deFree(thread);
82 deFree(thread);
86 if (pthread_create(&thread->thread, &attr, startThread, thread) != 0)
89 deFree(thread);
92 DE_ASSERT(thread->thread);
96 return (deThread)thread;
101 Thread* thread = (Thread*)threadptr;
104 DE_ASSERT(thread->thread);
105 ret = pthread_join(thread->thread, DE_NULL);
109 pthread_detach(thread->thread);
111 /* Thread is no longer valid as far as we are concerned. */
112 thread->thread = 0;
119 Thread* thread = (Thread*)threadptr;
121 if (thread->thread)
124 int ret = pthread_detach(thread->thread);
129 deFree(thread);