+
+
+#ifdef RTS_SUPPORTS_THREADS
+/* wakeBlockedWorkerThread
+ *
+ * If a worker thread is currently blocked within awaitEvent,
+ * wake it.
+ * Must be called with sched_mutex held.
+ */
+void
+wakeBlockedWorkerThread()
+{
+ if(isWorkerBlockedInAwaitEvent && !workerWakeupPending) {
+ unsigned char dummy = 42; // Any value will do here
+
+ // write something so that select() wakes up
+ write(workerWakeupPipe[1],&dummy,1);
+ workerWakeupPending = rtsTrue;
+ }
+}
+#endif