1 /* 2 Ascynchroneous non-buffered file I/O 3 Copyright Lasse Mikkel Reinhold 2006-2008 4 GPL-1 and GPL-2 licensed. 5 */ 6 #ifndef AIO_HEADER 7 #define AIO_HEADER 8 9 #define AIO_MAX_SECTOR_SIZE (64*1024) 10 11 #include <string.h> 12 13 size_t aread(void *dst, size_t size); 14 size_t awrite(const void *src, size_t size); 15 bool aopen_read(const char *file); 16 bool aopen_write(const char *file); 17 void aclose_read(void); 18 bool aclose_write(void); 19 unsigned long long awritten(void); 20 bool aio_init(size_t chunk_size, bool buffered_io); 21 size_t try_awrite(const void *Str, size_t Count); 22 size_t try_aread(void *DstBuf, size_t Count); 23 void fwrite64(unsigned long long i); 24 void fwrite32(unsigned int i); 25 unsigned int fread32(void); 26 unsigned long long fread64(void); 27 void adelete_write(void); 28 29 #endif 30