summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/basicTypes/UniqSupply.lhs6
-rw-r--r--includes/RtsExternal.h12
-rw-r--r--rts/RtsUtils.c6
-rw-r--r--rts/Threads.c6
-rw-r--r--rts/posix/Signals.c2
-rw-r--r--rts/win32/ThrIOManager.c10
6 files changed, 21 insertions, 21 deletions
diff --git a/compiler/basicTypes/UniqSupply.lhs b/compiler/basicTypes/UniqSupply.lhs
index 7937043dd6..710fc034a6 100644
--- a/compiler/basicTypes/UniqSupply.lhs
+++ b/compiler/basicTypes/UniqSupply.lhs
@@ -73,15 +73,15 @@ mkSplitUniqSupply (C# c#)
-- This is one of the most hammered bits in the whole compiler
mk_supply#
= unsafeInterleaveIO (
- genSymZh >>= \ (W# u#) ->
+ genSymZh >>= \ (I# u#) ->
mk_supply# >>= \ s1 ->
mk_supply# >>= \ s2 ->
- return (MkSplitUniqSupply (w2i (mask# `or#` u#)) s1 s2)
+ return (MkSplitUniqSupply (w2i (mask# `or#` (i2w u#))) s1 s2)
)
in
mk_supply#
-foreign import ccall unsafe "genSymZh" genSymZh :: IO Word
+foreign import ccall unsafe "genSymZh" genSymZh :: IO Int
splitUniqSupply (MkSplitUniqSupply _ s1 s2) = (s1, s2)
\end{code}
diff --git a/includes/RtsExternal.h b/includes/RtsExternal.h
index 37a9bd485c..3a3626b56b 100644
--- a/includes/RtsExternal.h
+++ b/includes/RtsExternal.h
@@ -26,8 +26,8 @@ extern void newCAF(StgClosure*);
#endif
/* ToDo: remove? */
-extern I_ genSymZh(void);
-extern I_ resetGenSymZh(void);
+extern HsInt genSymZh(void);
+extern HsInt resetGenSymZh(void);
/* Alternate to raise(3) for threaded rts, for OpenBSD */
extern int genericRaise(int sig);
@@ -37,7 +37,7 @@ extern int cmp_thread(StgPtr tso1, StgPtr tso2);
extern int rts_getThreadId(StgPtr tso);
extern int forkOS_createThread ( HsStablePtr entry );
extern StgInt forkProcess(HsStablePtr *entry);
-extern StgBool rtsSupportsBoundThreads(void);
+extern HsBool rtsSupportsBoundThreads(void);
extern StgInt newSpark (StgRegTable *reg, StgClosure *p);
/* grimy low-level support functions defined in StgPrimFloat.c */
@@ -86,9 +86,9 @@ extern StgInt *signal_handlers;
#endif
#if defined(mingw32_HOST_OS)
-void *getIOManagerEvent (void);
-StgWord32 readIOManagerEvent (void);
-void sendIOManagerEvent (StgWord32 event);
+HANDLE getIOManagerEvent (void);
+HsWord32 readIOManagerEvent (void);
+void sendIOManagerEvent (HsWord32 event);
#else
extern void setIOManagerPipe (int fd);
#endif
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);