summaryrefslogtreecommitdiff
path: root/rts/RetainerSet.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/RetainerSet.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/RetainerSet.h')
-rw-r--r--rts/RetainerSet.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/RetainerSet.h b/rts/RetainerSet.h
index ea9fabb7d7..c581293e8b 100644
--- a/rts/RetainerSet.h
+++ b/rts/RetainerSet.h
@@ -63,7 +63,7 @@ typedef CostCentre *retainer;
*/
typedef struct _RetainerSet {
- nat num; // number of elements
+ uint32_t num; // number of elements
StgWord hashKey; // hash key for this retainer set
struct _RetainerSet *link; // link to the next retainer set in the bucket
int id; // unique id of this retainer set (used when printing)
@@ -132,7 +132,7 @@ extern RetainerSet rs_MANY;
INLINE_HEADER rtsBool
isMember(retainer r, RetainerSet *rs)
{
- int i, left, right; // must be int, not nat (because -1 can appear)
+ int i, left, right; // must be int, not uint32_t (because -1 can appear)
retainer ri;
if (rs == &rs_MANY) { return rtsTrue; }
@@ -162,12 +162,12 @@ RetainerSet *addElement(retainer, RetainerSet *);
#ifdef SECOND_APPROACH
// Prints a single retainer set.
-void printRetainerSetShort(FILE *, RetainerSet *, nat);
+void printRetainerSetShort(FILE *, RetainerSet *, uint32_t);
#endif
// Print the statistics on all the retainer sets.
// store the sum of all costs and the number of all retainer sets.
-void outputRetainerSet(FILE *, nat *, nat *);
+void outputRetainerSet(FILE *, uint32_t *, uint32_t *);
#ifdef SECOND_APPROACH
// Print all retainer sets at the exit of the program.