From: Bruce Cran Date: Sun, 2 Jan 2011 19:14:54 +0000 (+0100) Subject: First snapshot of FIO for Windows X-Git-Tag: fio-1.50-rc1~1^2~3 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=03e20d687566753b90383571e5e152c5142bdffd First snapshot of FIO for Windows Signed-off-by: Jens Axboe --- diff --git a/HOWTO b/HOWTO index dc21afc0..3b1eeb06 100644 --- a/HOWTO +++ b/HOWTO @@ -271,12 +271,14 @@ filename=str Fio normally makes up a filename based on the job name, can specify a number of files by separating the names with a ':' colon. So if you wanted a job to open /dev/sda and /dev/sdb as the two working files, you would use - filename=/dev/sda:/dev/sdb. If the wanted filename does need to - include a colon, then escape that with a '\' character. For - instance, if the filename is "/dev/dsk/foo@3,0:c", then you would - use filename="/dev/dsk/foo@3,0\:c". '-' is a reserved name, - meaning stdin or stdout. Which of the two depends on the read/write - direction set. + filename=/dev/sda:/dev/sdb. On Windows, disk devices are accessed + as /dev/sda for the first device (i.e. \Device\HardDisk0\Partition0, + /dev/sda1 for the first partition on the first disk etc. If the + wanted filename does need to include a colon, then escape that with + a '\' character. For instance, if the filename is + "/dev/dsk/foo@3,0:c", then you would use filename="/dev/dsk/foo@3,0\:c". + '-' is a reserved name, meaning stdin or stdout. Which of the + two depends on the read/write direction set. opendir=str Tell fio to recursively add any file it can find in this directory and down the file system tree. @@ -492,6 +494,8 @@ ioengine=str Defines how the job issues io to the file. The following solarisaio Solaris native asynchronous io. + windowsaio Windows native asynchronous io. + mmap File is memory mapped and data copied to/from using memcpy(3). diff --git a/Makefile.Windows b/Makefile.Windows new file mode 100644 index 00000000..97a2813a --- /dev/null +++ b/Makefile.Windows @@ -0,0 +1,79 @@ +CC = gcc-3 +DEBUGFLAGS = -DFIO_INC_DEBUG +OPTFLAGS= -O2 -g $(EXTFLAGS) +CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) +PROGS = fio +SCRIPTS = fio_generate_plots +OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \ + eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \ + rbtree.o smalloc.o filehash.o helpers.o profile.o debug.o + +OBJS += lib/rand.o +OBJS += lib/flist_sort.o +OBJS += lib/num2str.o + +OBJS += crc/crc7.o +OBJS += crc/crc16.o +OBJS += crc/crc32.o +OBJS += crc/crc32c.o +OBJS += crc/crc32c-intel.o +OBJS += crc/crc64.o +OBJS += crc/sha1.o +OBJS += crc/sha256.o +OBJS += crc/sha512.o +OBJS += crc/md5.o + +OBJS += engines/cpu.o +OBJS += engines/mmap.o +OBJS += engines/posixaio.o +OBJS += engines/sync.o +OBJS += engines/null.o +OBJS += engines/net.o +OBJS += engines/windowsaio.o + +SOURCE = eta.c filehash.c filesetup.c fio.c gettime.c init.c ioengines.c \ + io_u.c log.c memory.c mutex.c options.c parse.c rbtree.c smalloc.c \ + stat.c parse.c crc/*.c engines/cpu.c engines/mmap.c \ + engines/posixaio.c engines/sync.c engines/null.c engines/net.c engines/windowsaio.c + +ifneq ($(findstring $(MAKEFLAGS),s),s) +ifndef V + QUIET_CC = @echo ' ' CC $@; + QUIET_DEP = @echo ' ' DEP $@; +endif +endif + +INSTALL = install +prefix = /usr/local +bindir = $(prefix)/bin +mandir = $(prefix)/man + +%.o: %.c + $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< +fio: $(OBJS) + $(QUIET_CC)windres os/windows/version.rc -O coff -o version.o + $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -lrt version.o + +depend: + $(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) $(SOURCE) 1> .depend + +$(PROGS): depend + +all: depend $(PROGS) $(SCRIPTS) + +clean: + -rm -f .depend cscope.out $(OBJS) $(PROGS) version.o core.* core + +cscope: + @cscope -b + +install: $(PROGS) $(SCRIPTS) + $(INSTALL) -m755 -d $(DESTDIR)$(bindir) + $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1 + +ifneq ($(wildcard .depend),) +include .depend +endif diff --git a/README b/README index 0f91c66f..f1ee9aa7 100644 --- a/README +++ b/README @@ -208,7 +208,8 @@ The job file parameters are: size=x Set file size to x bytes (x string can include k/m/g) ioengine=x 'x' may be: aio/libaio/linuxaio for Linux aio, posixaio for POSIX aio, solarisaio for Solaris - native async IO, sync for regular read/write io, + native async IO, windowsaio for Windows native async IO, + sync for regular read/write io, psync for regular pread/pwrite io, vsync for regular readv/writev (with queuing emulation) mmap for mmap'ed io, syslet-rw for syslet driven read/write, splice for diff --git a/compiler/compiler-gcc3.h b/compiler/compiler-gcc3.h index 566987a2..2fcc0d87 100644 --- a/compiler/compiler-gcc3.h +++ b/compiler/compiler-gcc3.h @@ -7,4 +7,8 @@ #endif #endif +#ifdef __CYGWIN__ +#define __weak +#endif + #endif diff --git a/engines/mmap.c b/engines/mmap.c index 002918c1..059bfcfa 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -45,12 +45,12 @@ static int fio_mmap_file(struct thread_data *td, struct fio_file *f, } if (!td_random(td)) { - if (madvise(f->mmap_ptr, length, MADV_SEQUENTIAL) < 0) { + if (posix_madvise(f->mmap_ptr, length, POSIX_MADV_SEQUENTIAL) < 0) { td_verror(td, errno, "madvise"); goto err; } } else { - if (madvise(f->mmap_ptr, length, MADV_RANDOM) < 0) { + if (posix_madvise(f->mmap_ptr, length, POSIX_MADV_RANDOM) < 0) { td_verror(td, errno, "madvise"); goto err; } @@ -170,7 +170,7 @@ static int fio_mmapio_queue(struct thread_data *td, struct io_u *io_u) io_u->error = errno; td_verror(td, io_u->error, "msync"); } - if (madvise(io_u->mmap_data, io_u->xfer_buflen, MADV_DONTNEED) < 0) { + if (posix_madvise(io_u->mmap_data, io_u->xfer_buflen, POSIX_MADV_DONTNEED) < 0) { io_u->error = errno; td_verror(td, io_u->error, "madvise"); } diff --git a/engines/net.c b/engines/net.c index 0566a618..b594e0a5 100644 --- a/engines/net.c +++ b/engines/net.c @@ -633,7 +633,7 @@ static struct ioengine_ops ioengine_splice = { .open_file = fio_netio_open_file, .close_file = generic_close_file, .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR | - FIO_SIGQUIT | FIO_PIPEIO, + FIO_SIGTERM | FIO_PIPEIO, }; #endif @@ -648,7 +648,7 @@ static struct ioengine_ops ioengine_rw = { .open_file = fio_netio_open_file, .close_file = fio_netio_close_file, .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR | - FIO_SIGQUIT | FIO_PIPEIO, + FIO_SIGTERM | FIO_PIPEIO, }; static void fio_init fio_netio_register(void) diff --git a/engines/posixaio.c b/engines/posixaio.c index f27ad8ce..061812e6 100644 --- a/engines/posixaio.c +++ b/engines/posixaio.c @@ -152,7 +152,7 @@ static struct io_u *fio_posixaio_event(struct thread_data *td, int event) return pd->aio_events[event]; } -static int fio_posixaio_queue(struct thread_data fio_unused *td, +static int fio_posixaio_queue(struct thread_data *td, struct io_u *io_u) { struct posixaio_data *pd = td->io_ops->data; diff --git a/engines/skeleton_external.c b/engines/skeleton_external.c index dec258c2..548676a7 100644 --- a/engines/skeleton_external.c +++ b/engines/skeleton_external.c @@ -59,7 +59,7 @@ static int fio_skeleton_cancel(struct thread_data *td, struct io_u *io_u) * * The io engine must transfer in the direction noted by io_u->ddir * to the buffer pointed to by io_u->xfer_buf for as many bytes as - * io_u->xfer_buflen. Residual data count may be set in io_u->residual + * io_u->xfer_buflen. Residual data count may be set in io_u->resid * for a short read/write. */ static int fio_skeleton_queue(struct thread_data *td, struct io_u *io_u) diff --git a/fifo.h b/fifo.h index 8e34fb61..74913653 100644 --- a/fifo.h +++ b/fifo.h @@ -40,15 +40,19 @@ static inline unsigned int fifo_room(struct fifo *fifo) return fifo->size - fifo->in + fifo->out; } +#ifndef min #define min(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \ (void) (&_x == &_y); \ _x < _y ? _x : _y; }) +#endif +#ifndef max #define max(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \ (void) (&_x == &_y); \ _x > _y ? _x : _y; }) +#endif diff --git a/file.h b/file.h index fa8c1d23..994d5fd0 100644 --- a/file.h +++ b/file.h @@ -49,6 +49,10 @@ struct fio_file { void *file_data; int fd; +#ifdef __CYGWIN__ + HANDLE hFile; + HANDLE ioCP; +#endif /* * filename and possible memory mapping diff --git a/filesetup.c b/filesetup.c index bb362342..5b96c66f 100644 --- a/filesetup.c +++ b/filesetup.c @@ -346,9 +346,9 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, * FIXME: add blockdev flushing too */ if (f->mmap_ptr) { - ret = madvise(f->mmap_ptr, f->mmap_sz, MADV_DONTNEED); + ret = posix_madvise(f->mmap_ptr, f->mmap_sz, POSIX_MADV_DONTNEED); #ifdef FIO_MADV_FREE - (void) madvise(f->mmap_ptr, f->mmap_sz, FIO_MADV_FREE); + (void) posix_madvise(f->mmap_ptr, f->mmap_sz, FIO_MADV_FREE); #endif } else if (f->filetype == FIO_TYPE_FILE) { ret = fadvise(f->fd, off, len, POSIX_FADV_DONTNEED); diff --git a/fio.1 b/fio.1 index eaa1c408..8d5baa83 100644 --- a/fio.1 +++ b/fio.1 @@ -331,7 +331,13 @@ coalescing adjacents IOs into a single submission. Linux native asynchronous I/O. .TP .B posixaio -glibc POSIX asynchronous I/O using \fIaio_read\fR\|(3) and \fIaio_write\fR\|(3). +POSIX asynchronous I/O using \fIaio_read\fR\|(3) and \fIaio_write\fR\|(3). +.TP +.B solarisaio +Solaris native asynchronous I/O. +.TP +.B windowsaio +Windows native asynchronous I/O. .TP .B mmap File is memory mapped with \fImmap\fR\|(2) and data copied using diff --git a/fio.c b/fio.c index 8dff813c..2420d103 100644 --- a/fio.c +++ b/fio.c @@ -101,12 +101,12 @@ static void terminate_threads(int group_id) * if the thread is running, just let it exit */ if (td->runstate < TD_RUNNING) - kill(td->pid, SIGQUIT); + kill(td->pid, SIGTERM); else { struct ioengine_ops *ops = td->io_ops; - if (ops && (ops->flags & FIO_SIGQUIT)) - kill(td->pid, SIGQUIT); + if (ops && (ops->flags & FIO_SIGTERM)) + kill(td->pid, SIGTERM); } } } @@ -161,8 +161,14 @@ static void posix_timer_setup(void) evt.sigev_notify = SIGEV_THREAD; evt.sigev_notify_function = ival_fn; +#ifndef __CYGWIN__ if (timer_create(CLOCK_MONOTONIC, &evt, &ival_timer) < 0) perror("timer_create"); +#else /* Windows (and thus Cygwin) doesn't have a monotonic clock */ + if (timer_create(CLOCK_REALTIME, &evt, &ival_timer) < 0) + perror("timer_create"); +#endif + } static void set_sig_handlers(void) @@ -177,7 +183,7 @@ static void set_sig_handlers(void) memset(&act, 0, sizeof(act)); act.sa_handler = sig_quit; act.sa_flags = SA_RESTART; - sigaction(SIGQUIT, &act, NULL); + sigaction(SIGTERM, &act, NULL); } /* @@ -1352,7 +1358,7 @@ static void reap_threads(int *nr_running, int *t_rate, int *m_rate) if (WIFSIGNALED(status)) { int sig = WTERMSIG(status); - if (sig != SIGQUIT) + if (sig != SIGTERM) log_err("fio: pid=%d, got signal=%d\n", (int) td->pid, sig); td_set_runstate(td, TD_REAPED); @@ -1703,7 +1709,11 @@ int main(int argc, char *argv[]) } startup_mutex = fio_mutex_init(0); + if (startup_mutex == NULL) + return 1; writeout_mutex = fio_mutex_init(1); + if (writeout_mutex == NULL) + return 1; set_genesis_time(); diff --git a/gettime.c b/gettime.c index 0ad8d924..72fda3f8 100644 --- a/gettime.c +++ b/gettime.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "fio.h" #include "smalloc.h" @@ -230,7 +231,7 @@ static void calibrate_cpu_clock(void) for (i = 0; i < 10; i++) { double this = cycles[i]; - if ((max(this, mean) - min(this, mean)) > S) + if ((fmax(this, mean) - fmin(this, mean)) > S) continue; samples++; avg += this; diff --git a/helpers.h b/helpers.h index 8307c43a..60729632 100644 --- a/helpers.h +++ b/helpers.h @@ -3,6 +3,8 @@ #include "compiler/compiler.h" +#include + struct in_addr; extern int __weak posix_memalign(void **ptr, size_t align, size_t size); @@ -12,4 +14,4 @@ extern int __weak clock_gettime(clockid_t clk_id, struct timespec *ts); extern int __weak sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); -#endif +#endif /* FIO_HELPERS_H_ */ diff --git a/init.c b/init.c index 97eac436..bdbb3774 100644 --- a/init.c +++ b/init.c @@ -1224,7 +1224,7 @@ int parse_options(int argc, char *argv[]) if (exec_profile) return 0; - log_err("No jobs defined(s)\n\n"); + log_err("No jobs(s) defined\n\n"); usage(argv[0]); return 1; } diff --git a/ioengine.h b/ioengine.h index a0c7e2bc..48a042bd 100644 --- a/ioengine.h +++ b/ioengine.h @@ -125,7 +125,7 @@ enum fio_ioengine_flags { FIO_NODISKUTIL = 1 << 4, /* diskutil can't handle filename */ FIO_UNIDIR = 1 << 5, /* engine is uni-directional */ FIO_NOIO = 1 << 6, /* thread does only pseudo IO */ - FIO_SIGQUIT = 1 << 7, /* needs SIGQUIT to exit */ + FIO_SIGTERM = 1 << 7, /* needs SIGTERM to exit */ FIO_PIPEIO = 1 << 8, /* input/output no seekable */ FIO_BARRIER = 1 << 9, /* engine supports barriers */ FIO_MEMALIGN = 1 << 10, /* engine wants aligned memory */ diff --git a/log.c b/log.c index 266dc06b..1ac2e353 100644 --- a/log.c +++ b/log.c @@ -434,7 +434,7 @@ static int init_iolog_read(struct thread_data *td) } /* - * Setup a log for storing io patterns. + * Set up a log for storing io patterns. */ static int init_iolog_write(struct thread_data *td) { diff --git a/log.h b/log.h index 71f89c1a..eea1129b 100644 --- a/log.h +++ b/log.h @@ -9,13 +9,13 @@ extern FILE *f_err; /* * If logging output to a file, stderr should go to both stderr and f_err */ -#define log_err(args...) do { \ - fprintf(f_err, ##args); \ - if (f_err != stderr) \ - fprintf(stderr, ##args); \ +#define log_err(args, ...) do { \ + fprintf(f_err, args, ##__VA_ARGS__); \ + if (f_err != stderr) \ + fprintf(stderr, args, ##__VA_ARGS__); \ } while (0) -#define log_info(args...) fprintf(f_out, ##args) +#define log_info(args, ...) fprintf(f_out, args, ##__VA_ARGS__) #define log_valist(str, args) vfprintf(f_out, (str), (args)) FILE *get_f_out(void); diff --git a/memory.c b/memory.c index b94cd6df..39fb9f23 100644 --- a/memory.c +++ b/memory.c @@ -63,7 +63,7 @@ int fio_pin_memory(void) static int alloc_mem_shm(struct thread_data *td, unsigned int total_mem) { - int flags = IPC_CREAT | SHM_R | SHM_W; + int flags = IPC_CREAT | S_IRUSR | S_IWUSR; if (td->o.mem_type == MEM_SHMHUGE) { unsigned long mask = td->o.hugepage_size - 1; @@ -181,7 +181,7 @@ static void free_mem_malloc(struct thread_data *td) } /* - * Setup the buffer area we need for io. + * Set up the buffer area we need for io. */ int allocate_io_mem(struct thread_data *td) { diff --git a/mutex.c b/mutex.c index 88044f3a..c1ce2a3e 100644 --- a/mutex.c +++ b/mutex.c @@ -93,6 +93,9 @@ struct fio_mutex *fio_mutex_init(int value) goto err; } + pthread_condattr_destroy(&cond); + pthread_mutexattr_destroy(&attr); + return mutex; err: if (mutex) diff --git a/options.c b/options.c index a08e2e43..ae5bcc5b 100644 --- a/options.c +++ b/options.c @@ -922,7 +922,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Use pread/pwrite", }, { .ival = "vsync", - .help = "Use readv/writev", + .help = "Use readv/writev", }, #ifdef FIO_HAVE_LIBAIO { .ival = "libaio", @@ -939,9 +939,14 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Solaris native asynchronous IO", }, #endif +#ifdef FIO_HAVE_WINDOWSAIO + { .ival = "windowsaio", + .help = "Windows native asynchronous IO" + }, { .ival = "mmap", - .help = "Memory mapped IO", + .help = "Memory mapped IO" }, +#endif #ifdef FIO_HAVE_SPLICE { .ival = "splice", .help = "splice/vmsplice based IO", @@ -967,7 +972,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { }, #endif { .ival = "cpuio", - .help = "CPU cycler burner engine", + .help = "CPU cycle burner engine", }, #ifdef FIO_HAVE_GUASI { .ival = "guasi", @@ -988,7 +993,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "iodepth", .type = FIO_OPT_INT, .off1 = td_var_offset(iodepth), - .help = "Amount of IO buffers to keep in flight", + .help = "Number of IO buffers to keep in flight", .minval = 1, .def = "1", }, @@ -1690,7 +1695,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .type = FIO_OPT_INT, .off1 = td_var_offset(rate_iops_min[0]), .off2 = td_var_offset(rate_iops_min[1]), - .help = "Job must meet this rate or it will be shutdown", + .help = "Job must meet this rate or it will be shut down", .parent = "rate_iops", }, { @@ -1735,7 +1740,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "create_fsync", .type = FIO_OPT_BOOL, .off1 = td_var_offset(create_fsync), - .help = "Fsync file after creation", + .help = "fsync file after creation", .def = "1", }, { @@ -1749,7 +1754,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "pre_read", .type = FIO_OPT_BOOL, .off1 = td_var_offset(pre_read), - .help = "Preread files before starting official testing", + .help = "Pre-read files before starting official testing", .def = "0", }, { @@ -1900,7 +1905,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "disable_slat", .type = FIO_OPT_BOOL, .off1 = td_var_offset(disable_slat), - .help = "Disable submissionn latency numbers", + .help = "Disable submission latency numbers", .parent = "gtod_reduce", .def = "0", }, @@ -1916,14 +1921,14 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "gtod_cpu", .type = FIO_OPT_INT, .cb = str_gtod_cpu_cb, - .help = "Setup dedicated gettimeofday() thread on this CPU", + .help = "Set up dedicated gettimeofday() thread on this CPU", .verify = gtod_cpu_verify, }, { .name = "continue_on_error", .type = FIO_OPT_BOOL, .off1 = td_var_offset(continue_on_error), - .help = "Continue on non-fatal errors during I/O", + .help = "Continue on non-fatal errors during IO", .def = "0", }, { diff --git a/os/os-windows.h b/os/os-windows.h new file mode 100644 index 00000000..f5da6a5d --- /dev/null +++ b/os/os-windows.h @@ -0,0 +1,104 @@ +#ifndef FIO_OS_WINDOWS_H +#define FIO_OS_WINDOWS_H + + +#include +#include + + +#define FIO_HAVE_ODIRECT +#define FIO_USE_GENERIC_RAND +#define FIO_HAVE_CHARDEV_SIZE +#define FIO_USE_GENERIC_RAND + +#define FIO_HAVE_FALLOCATE +#define FIO_HAVE_FDATASYNC +#define FIO_HAVE_WINDOWSAIO + +/* TODO add support for FIO_HAVE_CPU_AFFINITY */ + +#define OS_MAP_ANON MAP_ANON + +typedef off_t off64_t; + + +#define FIO_NOTUNIX + +#include +#include + +typedef void* HANDLE; + +BOOL WINAPI GetFileSizeEx( + HANDLE hFile, + PLARGE_INTEGER lpFileSize +); + +long _get_osfhandle( + int fd +); + +typedef struct { + LARGE_INTEGER Length; +} GET_LENGTH_INFORMATION; + +#define IOCTL_DISK_GET_LENGTH_INFO 0x7405C + + +static inline int blockdev_size(int fd, unsigned long long *bytes) +{ + int rc = 0; + HANDLE hFile = (HANDLE)_get_osfhandle(fd); + if (hFile != INVALID_HANDLE_VALUE) + { + GET_LENGTH_INFORMATION info; + DWORD outBytes; + LARGE_INTEGER size; + size.QuadPart = 0; + if (DeviceIoControl(hFile, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &info, sizeof(info), &outBytes, NULL)) + *bytes = info.Length.QuadPart; + else + rc = EIO; + } + + return 0; +} + +static inline int chardev_size(int fd, unsigned long long *bytes) +{ + return blockdev_size(fd, bytes); +} + +static inline int blockdev_invalidate_cache(int fd) +{ + int rc = 0; + HANDLE hFile = (HANDLE)_get_osfhandle(fd); + + if (hFile != INVALID_HANDLE_VALUE) + FlushFileBuffers(hFile); + else + rc = EIO; + + return rc; +} + +static inline unsigned long long os_phys_mem(void) +{ + SYSTEM_INFO sysInfo; + unsigned long addr; + GetSystemInfo(&sysInfo); + addr = (unsigned long)sysInfo.lpMaximumApplicationAddress; + return addr; +} + +static inline void os_get_tmpdir(char *path, int len) +{ + GetTempPath(len, path); +} + +#ifdef MADV_FREE +#define FIO_MADV_FREE MADV_FREE +#endif + + +#endif /* FIO_OS_WINDOWS_H */ diff --git a/os/os.h b/os/os.h index c8f517b6..95f0ff29 100644 --- a/os/os.h +++ b/os/os.h @@ -2,6 +2,7 @@ #define FIO_OS_H #include +#include #include #if defined(__linux__) @@ -16,6 +17,8 @@ #include "os-mac.h" #elif defined(_AIX) #include "os-aix.h" +#elif defined(__CYGWIN__) +#include "os-windows.h" #else #error "unsupported os" #endif diff --git a/os/windows/cygwin.wxs b/os/windows/cygwin.wxs new file mode 100755 index 00000000..19bc5a3b --- /dev/null +++ b/os/windows/cygwin.wxs @@ -0,0 +1,20079 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/os/windows/dobuild.cmd b/os/windows/dobuild.cmd new file mode 100755 index 00000000..05f85af2 --- /dev/null +++ b/os/windows/dobuild.cmd @@ -0,0 +1,4 @@ +"%WIX%\bin\candle" cygwin.wxs +"%WIX%\bin\candle" install.wxs +"%WIX%\bin\candle" examples.wxs +"%WIX%\bin\light" install.wixobj cygwin.wixobj examples.wixobj -ext WixUIExtension -out fio-1.44.msi \ No newline at end of file diff --git a/os/windows/eula.rtf b/os/windows/eula.rtf new file mode 100755 index 00000000..be37fad5 Binary files /dev/null and b/os/windows/eula.rtf differ diff --git a/os/windows/examples.wxs b/os/windows/examples.wxs new file mode 100755 index 00000000..707acdd2 --- /dev/null +++ b/os/windows/examples.wxs @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/os/windows/fio.sh b/os/windows/fio.sh new file mode 100755 index 00000000..7245ca90 --- /dev/null +++ b/os/windows/fio.sh @@ -0,0 +1,4 @@ +#!/bin/sh +/usr/sbin/cygserver > /dev/null & +/bin/real_fio $@ +/usr/sbin/cygserver -S > /dev/null \ No newline at end of file diff --git a/os/windows/fio/Cygwin.bat b/os/windows/fio/Cygwin.bat new file mode 100755 index 00000000..a2b17f9f --- /dev/null +++ b/os/windows/fio/Cygwin.bat @@ -0,0 +1,8 @@ +@echo off + +C: +IF EXIST "%PROGRAMFILES(X86)%" chdir "%PROGRAMFILES(X86)%\fio\bin" +IF NOT EXIST "%PROGRAMFILES(X86)%" chdir "%PROGRAMFILES%\fio\bin" + +bash -c "echo \"FIO is available as /bin/fio - type fio to run it.\" && echo \"Examples are in /usr/share/doc/fio/examples\" && echo \"Type \"cd\" to change directory and dir (or ls) to see directory contents.\" && echo \"To exit, close the window.\" && /usr/sbin/cygserver & 2> /dev/null" +bash --login -i \ No newline at end of file diff --git a/os/windows/harvest.cmd b/os/windows/harvest.cmd new file mode 100755 index 00000000..575af255 --- /dev/null +++ b/os/windows/harvest.cmd @@ -0,0 +1,2 @@ +"%WIX%\bin\heat" dir fio -gg -sfrag -scom -out cygwin.wxs -scom -sreg -dr cygwin -ke -cg cygwin +"%WIX%\bin\heat" dir ..\..\examples -gg -sfrag -scom -out examples.wxs -scom -sreg -dr examples -ke -cg examples diff --git a/os/windows/install.wxs b/os/windows/install.wxs new file mode 100755 index 00000000..f70d8fac --- /dev/null +++ b/os/windows/install.wxs @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fio@vger.kernel.org + http://www.spinics.net/lists/fio/ + http://git.kernel.dk/?p=fio.git + + + + + + + Installed OR + ALLUSERS=1 + + + + + \ No newline at end of file diff --git a/os/windows/version.rc b/os/windows/version.rc new file mode 100755 index 00000000..f13ba062 --- /dev/null +++ b/os/windows/version.rc @@ -0,0 +1,24 @@ +#include "../../version.h" +1 VERSIONINFO +FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD,0 +PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "" + VALUE "FileDescription", "Flexible IO Tester" + VALUE "FileVersion", "1.44.3" + VALUE "InternalName", "fio" + VALUE "LegalCopyright", "Copyright (C) 2010" + VALUE "OriginalFilename", "fio.exe" + VALUE "ProductName", "FIO" + VALUE "ProductVersion", VERSION_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/time.c b/time.c index 7015fd51..ef05094e 100644 --- a/time.c +++ b/time.c @@ -150,7 +150,7 @@ int ramp_time_over(struct thread_data *td) return 0; } -void fio_init fio_time_init(void) +void fio_time_init(void) { int i; diff --git a/verify.c b/verify.c index ea1a9115..dc107087 100644 --- a/verify.c +++ b/verify.c @@ -90,7 +90,7 @@ static void hexdump(void *buffer, int len) */ static inline unsigned int __hdr_size(int verify_type) { - unsigned int len = len; + unsigned int len = 0; switch (verify_type) { case VERIFY_NONE: diff --git a/verify.h b/verify.h index 29c4b46f..a6f89746 100644 --- a/verify.h +++ b/verify.h @@ -1,6 +1,8 @@ #ifndef FIO_VERIFY_H #define FIO_VERIFY_H +#include + #define FIO_HDR_MAGIC 0xf00baaef enum {