Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
waio.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/os/win/wposix/waio.h"
#include "lib/bits.h"
#include "lib/alignment.h"
#include "lib/module_init.h"
#include "lib/sysdep/filesystem.h"
#include "lib/sysdep/os/win/wutil.h"
#include "lib/sysdep/os/win/wiocp.h"
#include "lib/sysdep/os/win/wposix/crt_posix.h"
#include <atomic>
#include <ctime>
Include dependency graph for waio.cpp:

Classes

struct  OvlAllocator
 
struct  OvlAllocator::Entry
 
struct  FileControlBlock
 
struct  FileControlBlocks
 

Functions

static WUTIL_FUNC (pSetFileCompletionNotificationModes, BOOL,(HANDLE, UCHAR))
 
static WUTIL_FUNC (pSetFileIoOverlappedRange, BOOL,(HANDLE, PUCHAR, ULONG))
 
static WUTIL_FUNC (pSetFileValidData, BOOL,(HANDLE, LONGLONG))
 
static DWORD DesiredAccess (int oflag)
 
static DWORD ShareMode (int oflag)
 
static DWORD CreationDisposition (int oflag)
 
static DWORD FlagsAndAttributes ()
 
static Status OpenFile (const OsPath &pathname, int oflag, HANDLE &hFile)
 
static Status waio_Init ()
 
Status waio_Shutdown ()
 
Status waio_open (const OsPath &pathname, int oflag,...)
 
Status waio_close (int fd)
 
Status waio_Preallocate (int fd, off_t size)
 
static int Issue (aiocb *cb)
 
static bool AreAnyComplete (const struct aiocb *const cbs[], int n)
 
int aio_read (struct aiocb *cb)
 
int aio_write (struct aiocb *cb)
 
int lio_listio (int mode, struct aiocb *const cbs[], int n, struct sigevent *se)
 
int aio_suspend (const struct aiocb *const cbs[], int n, const struct timespec *timeout)
 
int aio_error (const struct aiocb *cb)
 
ssize_t aio_return (struct aiocb *cb)
 
int aio_cancel (int fd, struct aiocb *cb)
 
int aio_fsync (int, struct aiocb *)
 

Variables

static HANDLE hIOCP
 
static FileControlBlocks fileControlBlocks
 
static ModuleInitState waio_initState { 0 }
 

Function Documentation

◆ aio_cancel()

int aio_cancel ( int  fd,
struct aiocb cb 
)

◆ aio_error()

int aio_error ( const struct aiocb cb)

◆ aio_fsync()

int aio_fsync ( int  ,
struct aiocb  
)

◆ aio_read()

int aio_read ( struct aiocb cb)

◆ aio_return()

ssize_t aio_return ( struct aiocb cb)

◆ aio_suspend()

int aio_suspend ( const struct aiocb *const  cbs[],
int  n,
const struct timespec *  timeout 
)

◆ aio_write()

int aio_write ( struct aiocb cb)

◆ AreAnyComplete()

static bool AreAnyComplete ( const struct aiocb *const  cbs[],
int  n 
)
static

◆ CreationDisposition()

static DWORD CreationDisposition ( int  oflag)
static

◆ DesiredAccess()

static DWORD DesiredAccess ( int  oflag)
static

◆ FlagsAndAttributes()

static DWORD FlagsAndAttributes ( )
static

◆ Issue()

static int Issue ( aiocb cb)
static

◆ lio_listio()

int lio_listio ( int  mode,
struct aiocb *const  cbs[],
int  n,
struct sigevent se 
)

◆ OpenFile()

static Status OpenFile ( const OsPath pathname,
int  oflag,
HANDLE &  hFile 
)
static

◆ ShareMode()

static DWORD ShareMode ( int  oflag)
static

◆ waio_close()

Status waio_close ( int  fd)

◆ waio_Init()

static Status waio_Init ( )
static

◆ waio_open()

Status waio_open ( const OsPath pathname,
int  oflag,
  ... 
)

◆ waio_Preallocate()

Status waio_Preallocate ( int  fd,
off_t  size 
)

◆ waio_Shutdown()

Status waio_Shutdown ( )

◆ WUTIL_FUNC() [1/3]

static WUTIL_FUNC ( pSetFileCompletionNotificationModes  ,
BOOL  ,
(HANDLE, UCHAR)   
)
static

◆ WUTIL_FUNC() [2/3]

static WUTIL_FUNC ( pSetFileIoOverlappedRange  ,
BOOL  ,
(HANDLE, PUCHAR, ULONG)   
)
static

◆ WUTIL_FUNC() [3/3]

static WUTIL_FUNC ( pSetFileValidData  ,
BOOL  ,
(HANDLE, LONGLONG)   
)
static

Variable Documentation

◆ fileControlBlocks

FileControlBlocks fileControlBlocks
static

◆ hIOCP

HANDLE hIOCP
static

◆ waio_initState

ModuleInitState waio_initState { 0 }
static