Split part of the Task struct into a separate struct InCall
[ghc-hetmet.git] / rts / Schedule.h
index 2dd4acd..af322d8 100644 (file)
@@ -46,15 +46,8 @@ StgWord raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *excepti
 /* findRetryFrameHelper */
 StgWord findRetryFrameHelper (StgTSO *tso);
 
-/* workerStart()
- * 
- * Entry point for a new worker task.
- * Called from STG :  NO
- * Locks assumed   :  none
- */
-#if defined(THREADED_RTS)
-void OSThreadProcAttr workerStart(Task *task);
-#endif
+/* Entry point for a new worker */
+void scheduleWorker (Capability *cap, Task *task);
 
 /* The state of the scheduler.  This is used to control the sequence
  * of events during shutdown, and when the runtime is interrupted
@@ -126,7 +119,10 @@ void performPendingThrowTos (StgTSO *);
  * NOTE: tso->link should be END_TSO_QUEUE before calling this macro.
  * ASSUMES: cap->running_task is the current task.
  */
-INLINE_HEADER void
+EXTERN_INLINE void
+appendToRunQueue (Capability *cap, StgTSO *tso);
+
+EXTERN_INLINE void
 appendToRunQueue (Capability *cap, StgTSO *tso)
 {
     ASSERT(tso->_link == END_TSO_QUEUE);
@@ -136,7 +132,7 @@ appendToRunQueue (Capability *cap, StgTSO *tso)
        setTSOLink(cap, cap->run_queue_tl, tso);
     }
     cap->run_queue_tl = tso;
-    traceSchedEvent (cap, EVENT_THREAD_RUNNABLE, tso, 0);
+    traceEventThreadRunnable (cap, tso);
 }
 
 /* Push a thread on the beginning of the run queue.