Lines Matching full:thread
2 * drawElements Thread Library
21 * \brief Unix implementation of thread management.
51 pthread_t thread; member
54 } Thread; typedef
56 DE_STATIC_ASSERT(sizeof(deThread) >= sizeof(Thread*));
60 Thread* thread = (Thread*)entryPtr; in startThread() local
61 deThreadFunc func = thread->func; in startThread()
62 void* arg = thread->arg; in startThread()
64 /* Start actual thread. */ in startThread()
73 Thread* thread = (Thread*)deCalloc(sizeof(Thread)); in deThread_create() local
75 if (!thread) in deThread_create()
78 thread->func = func; in deThread_create()
79 thread->arg = arg; in deThread_create()
83 deFree(thread); in deThread_create()
93 deFree(thread); in deThread_create()
97 if (pthread_create(&thread->thread, &attr, startThread, thread) != 0) in deThread_create()
100 deFree(thread); in deThread_create()
103 DE_ASSERT(thread->thread); in deThread_create()
107 return (deThread)thread; in deThread_create()
112 Thread* thread = (Thread*)threadptr; in deThread_join() local
115 DE_ASSERT(thread->thread); in deThread_join()
116 ret = pthread_join(thread->thread, DE_NULL); in deThread_join()
120 pthread_detach(thread->thread); in deThread_join()
122 /* Thread is no longer valid as far as we are concerned. */ in deThread_join()
123 thread->thread = 0; in deThread_join()
130 Thread* thread = (Thread*)threadptr; in deThread_destroy() local
132 if (thread->thread) in deThread_destroy()
135 int ret = pthread_detach(thread->thread); in deThread_destroy()
140 deFree(thread); in deThread_destroy()