[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / rts / hooks / NoRunnableThreads.c
1 /* -----------------------------------------------------------------------------
2  * $Id: NoRunnableThreads.c,v 1.2 1998/12/02 13:29:13 simonm Exp $
3  *
4  * User-overridable RTS hooks.
5  *
6  * ---------------------------------------------------------------------------*/
7
8 #include "Rts.h"
9
10 /*
11   Hook to invoke when there's nothing left on the runnable threads
12   queue {\em and} we've got nothing to wait for. The value
13   returned is the exit code to report back. 
14   
15   NOTE: This hook is really CONCURRENT specific, but we include
16   it in the way-independent libHSclib.a.
17 */
18
19 int
20 NoRunnableThreadsHook (void)
21 {
22     fflush(stdout);
23     fprintf(stderr, "No runnable threads!\n");
24     return(EXIT_FAILURE);
25 }
26