- pthread_attr_t attribs;
- pthread_attr_init(&attribs);
- pthread_attr_setdetachstate(&attribs, PTHREAD_CREATE_JOINABLE);
- pthread_t* MyPThread = new pthread_t;
-
- /* Create a thread in a mutex. This prevents whacking the member value NewThread,
- * and also prevents recursive creation of threads by mistake (instead, the thread
- * will just deadlock itself)
- */
- Mutex(true);
-
- if (pthread_create(MyPThread, &attribs, PThreadEngine::Entry, (void*)this) != 0)