diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-02 06:37:14 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-05 08:29:27 +1000 |
commit | db9de7eb3e91820024f673bfdb6fb8064cfed20d (patch) | |
tree | 5e1c3ef0b6dee7f40fedbc118ba36cfe6ffdd1ee /rts/Stable.c | |
parent | ad4392c142696d5092533480a82ed65322e9d413 (diff) | |
download | haskell-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/Stable.c')
-rw-r--r-- | rts/Stable.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/Stable.c b/rts/Stable.c index 695c11d039..2c9480a559 100644 --- a/rts/Stable.c +++ b/rts/Stable.c @@ -113,7 +113,7 @@ static unsigned int SPT_size = 0; #endif static spEntry *old_SPTs[MAX_N_OLD_SPTS]; -static nat n_old_SPTs = 0; +static uint32_t n_old_SPTs = 0; #ifdef THREADED_RTS Mutex stable_mutex; @@ -153,7 +153,7 @@ stableUnlock(void) * -------------------------------------------------------------------------- */ STATIC_INLINE void -initSnEntryFreeList(snEntry *table, nat n, snEntry *free) +initSnEntryFreeList(snEntry *table, uint32_t n, snEntry *free) { snEntry *p; for (p = table + n - 1; p >= table; p--) { @@ -166,7 +166,7 @@ initSnEntryFreeList(snEntry *table, nat n, snEntry *free) } STATIC_INLINE void -initSpEntryFreeList(spEntry *table, nat n, spEntry *free) +initSpEntryFreeList(spEntry *table, uint32_t n, spEntry *free) { spEntry *p; for (p = table + n - 1; p >= table; p--) { @@ -208,7 +208,7 @@ initStableTables(void) static void enlargeStableNameTable(void) { - nat old_SNT_size = SNT_size; + uint32_t old_SNT_size = SNT_size; // 2nd and subsequent times SNT_size *= 2; @@ -223,7 +223,7 @@ enlargeStableNameTable(void) static void enlargeStablePtrTable(void) { - nat old_SPT_size = SPT_size; + uint32_t old_SPT_size = SPT_size; spEntry *new_stable_ptr_table; // 2nd and subsequent times @@ -273,7 +273,7 @@ enlargeStablePtrTable(void) static void freeOldSPTs(void) { - nat i; + uint32_t i; for (i = 0; i < n_old_SPTs; i++) { stgFree(old_SPTs[i]); |