- Passing of float/doubles
-- Passing of text
+- Endianness coverage
#include <sys/sysctl.h>
#include <sys/disk.h>
#include <sys/thr.h>
+#include <sys/endian.h>
#include "../file.h"
#define OS_MAP_ANON MAP_ANON
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define FIO_LITTLE_ENDIAN
+#else
+#define FIO_BIG_ENDIAN
+#endif
+
+#define fio_swap16(x) bswap16(x)
+#define fio_swap32(x) bswap32(x)
+#define fio_swap64(x) bswap64(x)
+
typedef off_t off64_t;
static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
#include <sys/pset.h>
#include <sys/mman.h>
#include <sys/dkio.h>
+#include <sys/byteorder.h>
#include "../file.h"
#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];
};
#include <errno.h>\r
#include <windows.h>\r
#include <psapi.h>\r
+#include <stdlib.h>\r
\r
#include "../smalloc.h"\r
#include "../file.h"\r
\r
#define FIO_PREFERRED_ENGINE "windowsaio"\r
\r
+#define FIO_LITTLE_ENDIAN\r
+#define fio_swap16(x) _byteswap_ushort(x)\r
+#define fio_swap32(x) _byteswap_ulong(x)\r
+#define fio_swap64(x) _byteswap_uint64(x)\r
+\r
typedef off_t off64_t;\r
\r
typedef struct {\r
#define FIO_MAX_JOBS 2048
#endif
+#if 0
+static inline uint16 fio_swap16(uint16_t val)
+{
+ return (val << 8) | (val >> 8);
+}
+
+static inline uint32_t bswap_32(uint32_t val)
+{
+ val = ((val & 0xff00ff00UL) >> 8) | ((val & 0x00ff00ffUL) << 8);
+
+ return (val >> 16) | (val << 16);
+}
+
+static inline uint64_t bswap_64(uint64_t x)
+{
+ val = ((val & 0xff00ff00ff00ff00ULL) >> 8) |
+ ((val & 0x00ff00ff00ff00ffULL) << 8);
+ val = ((val & 0xffff0000ffff0000ULL) >> 16) |
+ ((val & 0x0000ffff0000ffffULL) << 16);
+
+ return (val >> 32) | (val << 32);
+}
+#endif
+
#ifndef FIO_HAVE_BLKTRACE
static inline int is_blktrace(const char *fname)
{