Omit visibility pragmas on Windows (fixes warnings/validate failures)
[ghc.git] / rts / Threads.h
1 /* ---------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2006
4 *
5 * Thread-related functionality
6 *
7 * --------------------------------------------------------------------------*/
8
9 #ifndef THREADS_H
10 #define THREADS_H
11
12 BEGIN_RTS_PRIVATE
13
14 StgTSO * unblockOne (Capability *cap, StgTSO *tso);
15 StgTSO * unblockOne_ (Capability *cap, StgTSO *tso, rtsBool allow_migrate);
16
17 void awakenBlockedQueue (Capability *cap, StgTSO *tso);
18
19 void removeThreadFromMVarQueue (Capability *cap, StgMVar *mvar, StgTSO *tso);
20 void removeThreadFromQueue (Capability *cap, StgTSO **queue, StgTSO *tso);
21 void removeThreadFromDeQueue (Capability *cap, StgTSO **head, StgTSO **tail, StgTSO *tso);
22
23 StgBool isThreadBound (StgTSO* tso);
24
25 #ifdef DEBUG
26 void printThreadBlockage (StgTSO *tso);
27 void printThreadStatus (StgTSO *t);
28 void printAllThreads (void);
29 void printThreadQueue (StgTSO *t);
30 #endif
31
32 END_RTS_PRIVATE
33
34 #endif /* THREADS_H */