projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
graph: use rounded graph connections
[fio.git]
/
os
/
os-solaris.h
diff --git
a/os/os-solaris.h
b/os/os-solaris.h
index f93a04c8d69149dda8121279f754eaad2dfe004a..d97643d02c71394211e915e429ee91b1d6addf1f 100644
(file)
--- a/
os/os-solaris.h
+++ b/
os/os-solaris.h
@@
-1,6
+1,8
@@
#ifndef FIO_OS_SOLARIS_H
#define FIO_OS_SOLARIS_H
#ifndef FIO_OS_SOLARIS_H
#define FIO_OS_SOLARIS_H
+#define FIO_OS os_solaris
+
#include <errno.h>
#include <malloc.h>
#include <sys/types.h>
#include <errno.h>
#include <malloc.h>
#include <sys/types.h>
@@
-8,6
+10,7
@@
#include <sys/pset.h>
#include <sys/mman.h>
#include <sys/dkio.h>
#include <sys/pset.h>
#include <sys/mman.h>
#include <sys/dkio.h>
+#include <sys/byteorder.h>
#include "../file.h"
#include "../file.h"
@@
-19,18
+22,32
@@
#define FIO_HAVE_FDATASYNC
#define FIO_HAVE_CHARDEV_SIZE
#define FIO_USE_GENERIC_BDEV_SIZE
#define FIO_HAVE_FDATASYNC
#define FIO_HAVE_CHARDEV_SIZE
#define FIO_USE_GENERIC_BDEV_SIZE
+#define FIO_USE_GENERIC_INIT_RANDOM_STATE
+#define FIO_HAVE_GETTID
#define OS_MAP_ANON MAP_ANON
#define OS_RAND_MAX 2147483648UL
#define OS_MAP_ANON MAP_ANON
#define OS_RAND_MAX 2147483648UL
+#if defined(_BIG_ENDIAN)
+#define FIO_BIG_ENDIAN
+#else
+#define FIO_LITTLE_ENDIAN
+#endif
+
+#define fio_swap16(x) BSWAP_16(x)
+#define fio_swap32(x) BSWAP_32(x)
+#define fio_swap64(x) BSWAP_64(x)
+
struct solaris_rand_seed {
unsigned short r[3];
};
struct solaris_rand_seed {
unsigned short r[3];
};
+#ifndef POSIX_MADV_SEQUENTIAL
#define posix_madvise madvise
#define posix_madvise madvise
-#define POSIX_MADV_DONTNEED MADV_DONTNEED
#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
+#define POSIX_MADV_DONTNEED MADV_DONTNEED
#define POSIX_MADV_RANDOM MADV_RANDOM
#define POSIX_MADV_RANDOM MADV_RANDOM
+#endif
typedef psetid_t os_cpu_mask_t;
typedef struct solaris_rand_seed os_random_state_t;
typedef psetid_t os_cpu_mask_t;
typedef struct solaris_rand_seed os_random_state_t;
@@
-95,28
+112,25
@@
static inline int fio_set_odirect(int fd)
static inline int fio_cpuset_init(os_cpu_mask_t *mask)
{
static inline int fio_cpuset_init(os_cpu_mask_t *mask)
{
- int ret;
-
- if (pset_create(mask) < 0) {
- ret = errno;
+ if (pset_create(mask) < 0)
return -1;
return -1;
- }
return 0;
}
static inline int fio_cpuset_exit(os_cpu_mask_t *mask)
{
return 0;
}
static inline int fio_cpuset_exit(os_cpu_mask_t *mask)
{
- int ret;
-
- if (pset_destroy(*mask) < 0) {
- ret = errno;
+ if (pset_destroy(*mask) < 0)
return -1;
return -1;
- }
return 0;
}
return 0;
}
+static inline int gettid(void)
+{
+ return pthread_self();
+}
+
/*
* Should be enough, not aware of what (if any) restrictions Solaris has
*/
/*
* Should be enough, not aware of what (if any) restrictions Solaris has
*/