RtsUtils.h 1.09 KB
Newer Older
1
/* -----------------------------------------------------------------------------
2
 * $Id: RtsUtils.h,v 1.6 2000/01/12 15:15:17 simonmar Exp $
3 4
 *
 * (c) The GHC Team, 1998-1999
5 6 7 8 9 10 11 12 13 14 15
 *
 * General utility functions used in the RTS.
 *
 * ---------------------------------------------------------------------------*/

extern void *stgMallocBytes(int n, char *msg);
extern void *stgMallocWords(int n, char *msg);
extern void *stgReallocBytes(void *p, int n, char *msg);
extern void *stgReallocWords(void *p, int n, char *msg);
extern void barf(char *s, ...) __attribute__((__noreturn__)) ;
extern void belch(char *s, ...);
16
extern void prog_belch(char *s, ...);
17 18 19 20 21 22

extern void _stgAssert (char *filename, unsigned int linenum);

extern StgStablePtr errorHandler;
extern void raiseError( StgStablePtr handler );

23
extern void stackOverflow(void);
24 25
extern void heapOverflow(void);

26 27
void resetNonBlockingFd(int fd);

28 29 30 31 32 33 34 35 36
extern nat stg_strlen(char *str);

/*Defined in Main.c, but made visible here*/
extern void stg_exit(I_ n) __attribute__((noreturn));

char * time_str(void);

char *ullong_format_string(ullong, char *, rtsBool);