MySQL 8.0.39
Source Code Documentation
anonymous_namespace{my_winfile.cc} Namespace Reference

Classes

struct  HandleInfo
 
class  WindowsErrorGuard
 RAII guard which ensures that: More...
 

Typedefs

using HandleInfoAllocator = Malloc_allocator< HandleInfo >
 
using HandleInfoVector = std::vector< HandleInfo, HandleInfoAllocator >
 

Functions

size_t ToIndex (File fd)
 
int ToDescr (size_t hi)
 
bool IsValidIndex (size_t hi)
 
HandleInfo GetHandleInfo (File fd)
 
File RegisterHandle (HANDLE handle, int oflag)
 
HandleInfo UnregisterHandle (File fd)
 
File FileIndex (HANDLE handle)
 
LARGE_INTEGER MakeLargeInteger (int64_t src)
 
OVERLAPPED MakeOverlapped (DWORD l, DWORD h)
 
OVERLAPPED MakeOverlapped (int64_t src)
 
File my_win_sopen (const char *path, int oflag, int shflag, int pmode)
 Open a file with sharing. More...
 
File my_get_stdfile_descriptor (FILE *stream)
 

Variables

HandleInfoVectorhivp = nullptr
 

Typedef Documentation

◆ HandleInfoAllocator

using anonymous_namespace{my_winfile.cc}::HandleInfoAllocator = typedef Malloc_allocator<HandleInfo>

◆ HandleInfoVector

using anonymous_namespace{my_winfile.cc}::HandleInfoVector = typedef std::vector<HandleInfo, HandleInfoAllocator>

Function Documentation

◆ FileIndex()

File anonymous_namespace{my_winfile.cc}::FileIndex ( HANDLE  handle)

◆ GetHandleInfo()

HandleInfo anonymous_namespace{my_winfile.cc}::GetHandleInfo ( File  fd)

◆ IsValidIndex()

bool anonymous_namespace{my_winfile.cc}::IsValidIndex ( size_t  hi)

◆ MakeLargeInteger()

LARGE_INTEGER anonymous_namespace{my_winfile.cc}::MakeLargeInteger ( int64_t  src)

◆ MakeOverlapped() [1/2]

OVERLAPPED anonymous_namespace{my_winfile.cc}::MakeOverlapped ( DWORD  l,
DWORD  h 
)

◆ MakeOverlapped() [2/2]

OVERLAPPED anonymous_namespace{my_winfile.cc}::MakeOverlapped ( int64_t  src)

◆ my_get_stdfile_descriptor()

File anonymous_namespace{my_winfile.cc}::my_get_stdfile_descriptor ( FILE *  stream)

◆ my_win_sopen()

File anonymous_namespace{my_winfile.cc}::my_win_sopen ( const char *  path,
int  oflag,
int  shflag,
int  pmode 
)

Open a file with sharing.

Similar to _sopen() from libc, but allows managing share delete on win32.

Parameters
pathfile name
oflagoperation flags
shflagshare flag
pmodepermission flags
Return values
Filedescriptor of opened file if success
-1and sets errno and/or LastError if fails.

◆ RegisterHandle()

File anonymous_namespace{my_winfile.cc}::RegisterHandle ( HANDLE  handle,
int  oflag 
)

◆ ToDescr()

int anonymous_namespace{my_winfile.cc}::ToDescr ( size_t  hi)

◆ ToIndex()

size_t anonymous_namespace{my_winfile.cc}::ToIndex ( File  fd)

◆ UnregisterHandle()

HandleInfo anonymous_namespace{my_winfile.cc}::UnregisterHandle ( File  fd)

Variable Documentation

◆ hivp

HandleInfoVector* anonymous_namespace{my_winfile.cc}::hivp = nullptr