1 /* ---------------------------------------------------------------------------
3 * (c) The GHC Team, 2006
5 * Thread-related functionality
7 * --------------------------------------------------------------------------*/
12 #if defined(GRAN) || defined(PARALLEL_HASKELL)
13 StgBlockingQueueElement
* unblockOne (StgBlockingQueueElement
*bqe
,
16 StgTSO
* unblockOne (Capability
*cap
, StgTSO
*tso
);
17 StgTSO
* unblockOne_ (Capability
*cap
, StgTSO
*tso
, rtsBool allow_migrate
);
20 #if defined(GRAN) || defined(PARALLEL_HASKELL)
21 void awakenBlockedQueue(StgBlockingQueueElement
*q
, StgClosure
*node
);
23 void awakenBlockedQueue (Capability
*cap
, StgTSO
*tso
);
26 void removeThreadFromMVarQueue (StgMVar
*mvar
, StgTSO
*tso
);
27 void removeThreadFromQueue (StgTSO
**queue
, StgTSO
*tso
);
28 void removeThreadFromDeQueue (StgTSO
**head
, StgTSO
**tail
, StgTSO
*tso
);
30 StgBool
isThreadBound (StgTSO
* tso
);
33 void printThreadBlockage (StgTSO
*tso
);
34 void printThreadStatus (StgTSO
*t
);
35 void printAllThreads (void);
36 void printThreadQueue (StgTSO
*t
);
37 # if defined(PARALLEL_HASKELL)
38 void print_bq (StgClosure
*node
);
39 void print_bqe (StgBlockingQueueElement
*bqe
);
40 nat
run_queue_len (void);
42 void print_bq (StgClosure
*node
);
46 #endif /* THREADS_H */