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 /testsuite | |
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 'testsuite')
-rw-r--r-- | testsuite/tests/rts/testblockalloc.c | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/testheapalloced.c | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/testmblockalloc.c | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/testwsdeque.c | 14 |
4 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/rts/testblockalloc.c b/testsuite/tests/rts/testblockalloc.c index bde81d31e5..577245f45e 100644 --- a/testsuite/tests/rts/testblockalloc.c +++ b/testsuite/tests/rts/testblockalloc.c @@ -2,7 +2,7 @@ #include <stdio.h> -extern bdescr *allocGroup_lock_lock(nat n); +extern bdescr *allocGroup_lock_lock(uint32_t n); extern void freeGroup_lock(bdescr *p); const int ARRSIZE = 256; diff --git a/testsuite/tests/rts/testheapalloced.c b/testsuite/tests/rts/testheapalloced.c index e827ae2208..a28079572a 100644 --- a/testsuite/tests/rts/testheapalloced.c +++ b/testsuite/tests/rts/testheapalloced.c @@ -12,7 +12,7 @@ extern void *getNextMBlock(void *mblock); #include <stdio.h> #include <string.h> -extern bdescr *allocGroup_lock_lock(nat n); +extern bdescr *allocGroup_lock_lock(uint32_t n); extern void freeGroup_lock(bdescr *p); const int ARRSIZE = 2000; diff --git a/testsuite/tests/rts/testmblockalloc.c b/testsuite/tests/rts/testmblockalloc.c index cbfd050342..f464be9e3d 100644 --- a/testsuite/tests/rts/testmblockalloc.c +++ b/testsuite/tests/rts/testmblockalloc.c @@ -16,7 +16,7 @@ int main (int argc, char *argv[]) int i, j, b; void *a[ARRSIZE]; - nat sizes[ARRSIZE]; + uint32_t sizes[ARRSIZE]; srand(SEED); diff --git a/testsuite/tests/rts/testwsdeque.c b/testsuite/tests/rts/testwsdeque.c index e6f644c5de..3f17f321cd 100644 --- a/testsuite/tests/rts/testwsdeque.c +++ b/testsuite/tests/rts/testwsdeque.c @@ -31,7 +31,7 @@ StgWord last_v[THREADS][BUF]; #define CASTOP(addr,old,new) ((old) == cas(((StgPtr)addr),(old),(new))) void * -myStealWSDeque_ (WSDeque *q, nat n) +myStealWSDeque_ (WSDeque *q, uint32_t n) { void * stolen; StgWord b,t; @@ -75,7 +75,7 @@ myStealWSDeque_ (WSDeque *q, nat n) } void * -myStealWSDeque (WSDeque *q, nat n) +myStealWSDeque (WSDeque *q, uint32_t n) { void *stolen; @@ -88,8 +88,8 @@ myStealWSDeque (WSDeque *q, nat n) void dump(void) { - nat n; - nat i; + uint32_t n; + uint32_t i; for (n = 0; n < THREADS; n++) { debugBelch("\nthread %d:\n", n); for (i = bufs[n]; i >= stg_max(bufs[n]-20,0); i--) { @@ -102,7 +102,7 @@ void dump(void) // ----------------------------------------------------------------------------- -void work(void *p, nat n) +void work(void *p, uint32_t n) { StgWord val; @@ -120,7 +120,7 @@ void OSThreadProcAttr thief(void *info) { void *p; StgWord n; - nat count = 0; + uint32_t count = 0; n = (StgWord)info; @@ -138,7 +138,7 @@ void OSThreadProcAttr thief(void *info) int main(int argc, char*argv[]) { int n; - nat count = 0; + uint32_t count = 0; void *p; q = newWSDeque(1024); |