Warning police: Avoid warning about unused variable
[ghc-hetmet.git] / rts / posix / OSThreads.c
index 07bd762..7aaa76a 100644 (file)
@@ -16,6 +16,7 @@
 #if defined(THREADED_RTS)
 #include "OSThreads.h"
 #include "RtsUtils.h"
+#include "Task.h"
 
 #if HAVE_STRING_H
 #include <string.h>
@@ -92,6 +93,14 @@ osThreadId()
   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)
 {
@@ -105,6 +114,11 @@ initMutex(Mutex* pMut)
 #endif
     return;
 }
+void
+closeMutex(Mutex* pMut)
+{
+    pthread_mutex_destroy(pMut);
+}
 
 void
 newThreadLocalKey (ThreadLocalKey *key)
@@ -140,6 +154,7 @@ forkOS_createThreadWrapper ( void * entry )
     Capability *cap;
     cap = rts_lock();
     cap = rts_evalStableIO(cap, (HsStablePtr) entry, NULL);
+    taskTimeStamp(myTask());
     rts_unlock(cap);
     return NULL;
 }