Signals: Always install SIGUSR2 handler
[ghc.git] / rts / posix / OSThreads.c
index f42b4e9..8c1beda 100644 (file)
@@ -129,11 +129,16 @@ shutdownThread(void)
 }
 
 int
-createOSThread (OSThreadId* pId, OSThreadProc *startProc, void *param)
+createOSThread (OSThreadId* pId, char *name STG_UNUSED,
+                OSThreadProc *startProc, void *param)
 {
   int result = pthread_create(pId, NULL, (void *(*)(void *))startProc, param);
-  if(!result)
+  if (!result) {
     pthread_detach(*pId);
+#if HAVE_PTHREAD_SETNAME_NP
+    pthread_setname_np(*pId, name);
+#endif
+  }
   return result;
 }
 
@@ -353,11 +358,3 @@ KernelThreadId kernelThreadId (void)
     return 0;
 #endif
 }
-
-// Local Variables:
-// mode: C
-// fill-column: 80
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End: