RtsUtils.h 1.05 KB
Newer Older
1
/* -----------------------------------------------------------------------------
2
 * $Id: RtsUtils.h,v 1.11 2001/08/29 14:55:58 sewardj Exp $
3
4
 *
 * (c) The GHC Team, 1998-1999
5
6
7
8
9
10
11
12
13
 *
 * 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);
14
15
extern void *stgCallocBytes(int n, int m, char *msg);

16
17
extern void barf(char *s, ...) __attribute__((__noreturn__)) ;
extern void belch(char *s, ...);
18
extern void prog_belch(char *s, ...);
19
20
21
22
23

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

extern void heapOverflow(void);

24
25
void resetNonBlockingFd(int fd);

26
27
28
29
30
extern nat stg_strlen(char *str);

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

31
char *time_str(void);
32
char *ullong_format_string(ullong, char *, rtsBool);
33
34

ullong   msTime(void);
35

36