summaryrefslogtreecommitdiff
path: root/rts/sm/Compact.h
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/sm/Compact.h
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/sm/Compact.h')
-rw-r--r--rts/sm/Compact.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h
index db7a9694d2..7ff6e12d14 100644
--- a/rts/sm/Compact.h
+++ b/rts/sm/Compact.h
@@ -19,7 +19,7 @@
INLINE_HEADER void
mark(StgPtr p, bdescr *bd)
{
- nat offset_within_block = p - bd->start; // in words
+ uint32_t offset_within_block = p - bd->start; // in words
StgPtr bitmap_word = (StgPtr)bd->u.bitmap +
(offset_within_block / (sizeof(W_)*BITS_PER_BYTE));
StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1));
@@ -29,7 +29,7 @@ mark(StgPtr p, bdescr *bd)
INLINE_HEADER void
unmark(StgPtr p, bdescr *bd)
{
- nat offset_within_block = p - bd->start; // in words
+ uint32_t offset_within_block = p - bd->start; // in words
StgPtr bitmap_word = (StgPtr)bd->u.bitmap +
(offset_within_block / (sizeof(W_)*BITS_PER_BYTE));
StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1));
@@ -39,7 +39,7 @@ unmark(StgPtr p, bdescr *bd)
INLINE_HEADER StgWord
is_marked(StgPtr p, bdescr *bd)
{
- nat offset_within_block = p - bd->start; // in words
+ uint32_t offset_within_block = p - bd->start; // in words
StgPtr bitmap_word = (StgPtr)bd->u.bitmap +
(offset_within_block / (sizeof(W_)*BITS_PER_BYTE));
StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1));