Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-01-04 12:17:55 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-01-04 12:17:55 +0300
commit7bef7db5ccd9c68f28ba541cb9a7bb0b15641945 (patch)
tree3adc4129e9755b98c6ba0afe81e63fe2b8c81d91 /winsup/cygwin/fhandler.h
parent48edcc3fccaddb1ea621b30657f7ad44519c54b2 (diff)
* fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
* fhandler.cc (fhandler_base::fstat): Set st_blksize to PREFERRED_IO_BLKSIZE. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto. * fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 6e7bf4821..5a294f30a 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1,7 +1,7 @@
/* fhandler.h
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Red Hat, Inc.
+ 2005, 2006, 2007 Red Hat, Inc.
This file is part of Cygwin.
@@ -25,6 +25,11 @@ details. */
both flags are set. */
#define O_NONBLOCK_MASK (O_NONBLOCK | OLD_O_NDELAY)
+/* It appears that 64K is the block size used for buffered I/O on NT.
+ Using this blocksize in read/write calls in the application results
+ in a much better performance than using smaller values. */
+#define PREFERRED_IO_BLKSIZE ((blksize_t) 65536)
+
extern const char *windows_device_names[];
extern struct __cygwin_perfile *perfile_table;
#define __fmode (*(user_data->fmode_ptr))