RtsUtils.h 1.09 KB
Newer Older
1
/* -----------------------------------------------------------------------------
2
 * $Id: RtsUtils.h,v 1.12 2001/10/31 10:30:29 simonmar 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
extern void setNonBlockingFd(int fd);
extern void resetNonBlockingFd(int fd);
26

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

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

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

ullong   msTime(void);
36

37