diff options
author | Ian Lynagh <igloo@earth.li> | 2007-04-03 19:53:24 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-04-03 19:53:24 +0000 |
commit | 150cc9e2e4657cc58bd7ec4c15e5cb72f2e1c0f6 (patch) | |
tree | 617f13ae77fa27d366c3fad92965583dcdf42896 /rts | |
parent | f2b02ce821f793bd1ccc23f2bcbef8efc82dd38e (diff) | |
download | haskell-150cc9e2e4657cc58bd7ec4c15e5cb72f2e1c0f6.tar.gz |
Fix C/Haskell type mismatches
Diffstat (limited to 'rts')
-rw-r--r-- | rts/RtsUtils.c | 6 | ||||
-rw-r--r-- | rts/Threads.c | 6 | ||||
-rw-r--r-- | rts/posix/Signals.c | 2 | ||||
-rw-r--r-- | rts/win32/ThrIOManager.c | 10 |
4 files changed, 12 insertions, 12 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index a62a459be2..7048e94cd0 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -298,14 +298,14 @@ nat stg_strlen(char *s) ToDo: put this somewhere sensible. ------------------------------------------------------------------------- */ -static I_ __GenSymCounter = 0; +static HsInt __GenSymCounter = 0; -I_ +HsInt genSymZh(void) { return(__GenSymCounter++); } -I_ +HsInt resetGenSymZh(void) /* it's your funeral */ { __GenSymCounter=0; diff --git a/rts/Threads.c b/rts/Threads.c index d2cac625ef..d7b5f4168e 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -657,13 +657,13 @@ awakenBlockedQueue(Capability *cap, StgTSO *tso) * used by Control.Concurrent for error checking. * ------------------------------------------------------------------------- */ -StgBool +HsBool rtsSupportsBoundThreads(void) { #if defined(THREADED_RTS) - return rtsTrue; + return HS_BOOL_TRUE; #else - return rtsFalse; + return HS_BOOL_FALSE; #endif } diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 4ae22cd143..abbb97ae68 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -41,7 +41,7 @@ * to POSIX.1 to control whether or not to include SA_NOCLDSTOP when * installing a SIGCHLD handler. */ -StgInt nocldstop = 0; +HsInt nocldstop = 0; /* ----------------------------------------------------------------------------- * The table of signal handlers diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c index b0da0deee9..76747c2376 100644 --- a/rts/win32/ThrIOManager.c +++ b/rts/win32/ThrIOManager.c @@ -59,20 +59,20 @@ nat next_event; #endif
-StgWord32
+HsWord32
readIOManagerEvent (void)
{
// This function must exist even in non-THREADED_RTS,
// see getIOManagerEvent() above.
#if defined(THREADED_RTS)
- StgWord32 res;
+ HsWord32 res;
ACQUIRE_LOCK(&event_buf_mutex);
if (io_manager_event != INVALID_HANDLE_VALUE) {
if (next_event == 0) {
res = 0; // no event to return
} else {
- res = event_buf[--next_event];
+ res = (HsWord32)(event_buf[--next_event]);
if (next_event == 0) {
if (!ResetEvent(io_manager_event)) {
sysErrorBelch("readIOManagerEvent");
@@ -92,7 +92,7 @@ readIOManagerEvent (void) }
void
-sendIOManagerEvent (StgWord32 event)
+sendIOManagerEvent (HsWord32 event)
{
#if defined(THREADED_RTS)
// debugBelch("sendIOManagerEvent: %d\n", event);
@@ -105,7 +105,7 @@ sendIOManagerEvent (StgWord32 event) sysErrorBelch("sendIOManagerEvent");
stg_exit(EXIT_FAILURE);
}
- event_buf[next_event++] = event;
+ event_buf[next_event++] = (StgWord32)event;
}
}
RELEASE_LOCK(&event_buf_mutex);
|