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