return pthread_self();
}
+rtsBool
+osThreadIsAlive(OSThreadId id STG_UNUSED)
+{
+ // no good way to implement this on POSIX, AFAICT. Returning true
+ // is safe.
+ return rtsTrue;
+}
+
void
initMutex(Mutex* pMut)
{
#endif
return;
}
+void
+closeMutex(Mutex* pMut)
+{
+ pthread_mutex_destroy(pMut);
+}
void
newThreadLocalKey (ThreadLocalKey *key)
}
}
+void
+freeThreadLocalKey (ThreadLocalKey *key)
+{
+ int r;
+ if ((r = pthread_key_delete(*key)) != 0) {
+ barf("freeThreadLocalKey: %s", strerror(r));
+ }
+}
+
static void *
forkOS_createThreadWrapper ( void * entry )
{