summaryrefslogtreecommitdiff
path: root/rts/Pool.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/Pool.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/Pool.h')
-rw-r--r--rts/Pool.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/rts/Pool.h b/rts/Pool.h
index dd00412d27..5190ce8bcc 100644
--- a/rts/Pool.h
+++ b/rts/Pool.h
@@ -23,7 +23,7 @@ typedef void (*free_thing_fn)(void *);
typedef struct Pool_ Pool;
/* Create a pool of things. */
-Pool *poolInit(nat max_size, nat desired_size,
+Pool *poolInit(uint32_t max_size, uint32_t desired_size,
alloc_thing_fn alloc_fn, free_thing_fn free_fn);
/* Free a pool. Returns 0 on success or 1 on failure due to things
@@ -32,16 +32,16 @@ int poolFree(Pool *pool);
/* Set the maximum size of a pool (0 indicates unbounded). desired_size will be
* lowered if necessary. */
-void poolSetMaxSize(Pool *pool, nat size);
+void poolSetMaxSize(Pool *pool, uint32_t size);
/* Get the maximum size of a pool */
-nat poolGetMaxSize(Pool *pool);
+uint32_t poolGetMaxSize(Pool *pool);
/* Set the desired size of a pool */
-void poolSetDesiredSize(Pool *pool, nat size);
+void poolSetDesiredSize(Pool *pool, uint32_t size);
/* Get the desired size of a pool */
-nat poolGetDesiredSize(Pool *pool);
+uint32_t poolGetDesiredSize(Pool *pool);
/* Try to grab an available thing from a pool, returning NULL if no things
* are available.