summaryrefslogtreecommitdiff
path: root/os/os-mac.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-12-15 10:28:37 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-15 10:28:37 +0100
commit535313705d69dc16f27ca38acf2f9bf7205e410d (patch)
treedb57c488c22530b5031924fd066f307cc4535306 /os/os-mac.h
parent3b2e1464ae58caf42c74ab4bdeaa5eae7c38a23f (diff)
downloadfio-535313705d69dc16f27ca38acf2f9bf7205e410d.tar.gz
fio-535313705d69dc16f27ca38acf2f9bf7205e410d.tar.bz2
Add generic random helpers
FreeBSD and OSX can both use these. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'os/os-mac.h')
-rw-r--r--os/os-mac.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/os/os-mac.h b/os/os-mac.h
index 77c21656..1c3798bf 100644
--- a/os/os-mac.h
+++ b/os/os-mac.h
@@ -14,11 +14,11 @@
#define FIO_HAVE_POSIXAIO
#define FIO_USE_GENERIC_BDEV_SIZE
+#define FIO_USE_GENERIC_RAND
#define OS_MAP_ANON MAP_ANON
typedef unsigned long os_cpu_mask_t;
-typedef unsigned int os_random_state_t;
typedef unsigned int clockid_t;
static inline int blockdev_invalidate_cache(int fd)
@@ -35,18 +35,4 @@ static inline unsigned long long os_phys_mem(void)
sysctl(mib, 2, &mem, &len, NULL, 0);
return mem;
}
-
-static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
-{
- srand(seed);
-}
-
-static inline long os_random_long(os_random_state_t *rs)
-{
- long val;
-
- val = rand_r(rs);
- return val;
-}
-
#endif