// Place a new thread on the run queue of the current Capability
void scheduleThread (Capability *cap, StgTSO *tso);
// Place a new thread on the run queue of the current Capability
void scheduleThread (Capability *cap, StgTSO *tso);
* NOTE: tso->link should be END_TSO_QUEUE before calling this macro.
* ASSUMES: cap->running_task is the current task.
*/
* NOTE: tso->link should be END_TSO_QUEUE before calling this macro.
* ASSUMES: cap->running_task is the current task.
*/
appendToRunQueue (Capability *cap, StgTSO *tso)
{
ASSERT(tso->link == END_TSO_QUEUE);
appendToRunQueue (Capability *cap, StgTSO *tso)
{
ASSERT(tso->link == END_TSO_QUEUE);
* newly awakened threads, so they get run as soon as possible.
* ASSUMES: cap->running_task is the current task.
*/
* newly awakened threads, so they get run as soon as possible.
* ASSUMES: cap->running_task is the current task.
*/
pushOnRunQueue (Capability *cap, StgTSO *tso)
{
tso->link = cap->run_queue_hd;
pushOnRunQueue (Capability *cap, StgTSO *tso)
{
tso->link = cap->run_queue_hd;
appendToWakeupQueue (Capability *cap, StgTSO *tso)
{
ASSERT(tso->link == END_TSO_QUEUE);
appendToWakeupQueue (Capability *cap, StgTSO *tso)
{
ASSERT(tso->link == END_TSO_QUEUE);
emptyRunQueue(Capability *cap)
{
return emptyQueue(cap->run_queue_hd);
}
#if defined(THREADED_RTS)
emptyRunQueue(Capability *cap)
{
return emptyQueue(cap->run_queue_hd);
}
#if defined(THREADED_RTS)