X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;h=8f6579cb740a62a9155fe99e4a5317b0998c1c16;hb=76c6edcbde24c92a09642469d2bbe617278c391f;hp=64b7758d356807e50b652c76052aa8d13f049a10;hpb=fbe64026eac8b559693868f38e6a9e6dad8a8ec6;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 64b7758..8f6579c 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.30 2003/03/19 18:41:19 sof Exp $ + * $Id: RtsUtils.c,v 1.34 2003/04/01 15:40:27 sof Exp $ * * (c) The GHC Team, 1998-2002 * @@ -109,18 +109,6 @@ stgReallocBytes (void *p, int n, char *msg) } void * -stgMallocWords (int n, char *msg) -{ - return(stgMallocBytes(n * sizeof(W_), msg)); -} - -void * -stgReallocWords (void *p, int n, char *msg) -{ - return(stgReallocBytes(p, n * sizeof(W_), msg)); -} - -void * stgCallocBytes (int n, int m, char *msg) { int i; @@ -130,6 +118,15 @@ stgCallocBytes (int n, int m, char *msg) return p; } +/* To simplify changing the underlying allocator used + * by stgMallocBytes(), provide stgFree() as well. + */ +void +stgFree(void* p) +{ + free(p); +} + void _stgAssert (char *filename, unsigned int linenum) { @@ -255,11 +252,14 @@ setNonBlockingFd(int fd) fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK); } #else -/* Don't support non-blocking FDs (yet) on mingw */ +/* Stub defns -- async / non-blocking IO is not done + * via O_NONBLOCK and select() under Win32. + */ void resetNonBlockingFd(int fd STG_UNUSED) {} void setNonBlockingFd(int fd STG_UNUSED) {} #endif +#ifdef PAR static ullong startTime = 0; /* used in a parallel setup */ @@ -294,6 +294,7 @@ msTime(void) return t * LL(1000) - startTime; # endif } +#endif /* PAR */ /* ----------------------------------------------------------------------------- Print large numbers, with punctuation.