summaryrefslogtreecommitdiff
path: root/rts/ThreadPaused.c
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-05-02 06:37:14 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-05-05 08:29:27 +1000
commitdb9de7eb3e91820024f673bfdb6fb8064cfed20d (patch)
tree5e1c3ef0b6dee7f40fedbc118ba36cfe6ffdd1ee /rts/ThreadPaused.c
parentad4392c142696d5092533480a82ed65322e9d413 (diff)
downloadhaskell-db9de7eb3e91820024f673bfdb6fb8064cfed20d.tar.gz
rts: Replace `nat` with `uint32_t`
The `nat` type was an alias for `unsigned int` with a comment saying it was at least 32 bits. We keep the typedef in case client code is using it but mark it as deprecated. Test Plan: Validated on Linux, OS X and Windows Reviewers: simonmar, austin, thomie, hvr, bgamari, hsyl20 Differential Revision: https://phabricator.haskell.org/D2166
Diffstat (limited to 'rts/ThreadPaused.c')
-rw-r--r--rts/ThreadPaused.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c
index 1f1d0afe58..f58a51ed8f 100644
--- a/rts/ThreadPaused.c
+++ b/rts/ThreadPaused.c
@@ -30,12 +30,12 @@
struct stack_gap { StgWord gap_size; struct stack_gap *next_gap; };
static struct stack_gap *
-updateAdjacentFrames (Capability *cap, StgTSO *tso,
- StgUpdateFrame *upd, nat count, struct stack_gap *next)
+updateAdjacentFrames (Capability *cap, StgTSO *tso, StgUpdateFrame *upd,
+ uint32_t count, struct stack_gap *next)
{
StgClosure *updatee;
struct stack_gap *gap;
- nat i;
+ uint32_t i;
// The first one (highest address) is the frame we take the
// "master" updatee from; all the others will be made indirections
@@ -80,7 +80,7 @@ static void
stackSqueeze(Capability *cap, StgTSO *tso, StgPtr bottom)
{
StgPtr frame;
- nat adjacent_update_frames;
+ uint32_t adjacent_update_frames;
struct stack_gap *gap;
// Stage 1:
@@ -158,7 +158,7 @@ stackSqueeze(Capability *cap, StgTSO *tso, StgPtr bottom)
{
StgWord8 *sp;
StgWord8 *gap_start, *next_gap_start, *gap_end;
- nat chunk_size;
+ uint32_t chunk_size;
next_gap_start = (StgWord8*)gap + sizeof(StgUpdateFrame);
sp = next_gap_start;
@@ -197,9 +197,9 @@ threadPaused(Capability *cap, StgTSO *tso)
const StgInfoTable *cur_bh_info USED_IF_THREADS;
StgClosure *bh;
StgPtr stack_end;
- nat words_to_squeeze = 0;
- nat weight = 0;
- nat weight_pending = 0;
+ uint32_t words_to_squeeze = 0;
+ uint32_t weight = 0;
+ uint32_t weight_pending = 0;
rtsBool prev_was_update_frame = rtsFalse;
StgWord heuristic_says_squeeze;
@@ -352,7 +352,7 @@ threadPaused(Capability *cap, StgTSO *tso)
// normal stack frames; do nothing except advance the pointer
default:
{
- nat frame_size = stack_frame_sizeW(frame);
+ uint32_t frame_size = stack_frame_sizeW(frame);
weight_pending += frame_size;
frame = (StgClosure *)((StgPtr)frame + frame_size);
prev_was_update_frame = rtsFalse;