summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2019-10-02 13:52:28 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-03 12:17:34 -0400
commitd0924b153b093a925c9e721f2540f3dfd6c278ae (patch)
tree0779ee1ecad8c43c6d171be9c19751277f018a83
parent47386fe85a412c8aa35f6bcbce0d41f0eed03b65 (diff)
downloadhaskell-d0924b153b093a925c9e721f2540f3dfd6c278ae.tar.gz
Extend argument of createIOThread to word size
Function createIOThread expects its second argument to be of size word. The natural size of the second parameter is 32bits. Thus for some 64bit architectures, where a write of the lower half of a register does not clear the upper half, the value must be zero extended.
-rw-r--r--rts/PrimOps.cmm4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 777dc93637..d06cde05d9 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -927,7 +927,7 @@ stg_forkzh ( gcptr closure )
gcptr threadid;
("ptr" threadid) = ccall createIOThread( MyCapability() "ptr",
- RtsFlags_GcFlags_initialStkSize(RtsFlags),
+ TO_W_(RtsFlags_GcFlags_initialStkSize(RtsFlags)),
closure "ptr");
/* start blocked if the current thread is blocked */
@@ -952,7 +952,7 @@ again: MAYBE_GC(again);
("ptr" threadid) = ccall createIOThread(
MyCapability() "ptr",
- RtsFlags_GcFlags_initialStkSize(RtsFlags),
+ TO_W_(RtsFlags_GcFlags_initialStkSize(RtsFlags)),
closure "ptr");
/* start blocked if the current thread is blocked */