1 /* -----------------------------------------------------------------------------
2 * $Id: RtsUtils.h,v 1.12 2001/10/31 10:30:29 simonmar Exp $
4 * (c) The GHC Team, 1998-1999
6 * General utility functions used in the RTS.
8 * ---------------------------------------------------------------------------*/
10 extern void *stgMallocBytes(int n, char *msg);
11 extern void *stgMallocWords(int n, char *msg);
12 extern void *stgReallocBytes(void *p, int n, char *msg);
13 extern void *stgReallocWords(void *p, int n, char *msg);
14 extern void *stgCallocBytes(int n, int m, char *msg);
16 extern void barf(char *s, ...) __attribute__((__noreturn__)) ;
17 extern void belch(char *s, ...);
18 extern void prog_belch(char *s, ...);
20 extern void _stgAssert (char *filename, unsigned int linenum);
22 extern void heapOverflow(void);
24 extern void setNonBlockingFd(int fd);
25 extern void resetNonBlockingFd(int fd);
27 extern nat stg_strlen(char *str);
29 /*Defined in Main.c, but made visible here*/
30 extern void stg_exit(I_ n) __attribute__((noreturn));
33 char *ullong_format_string(ullong, char *, rtsBool);