MCPcopy Create free account
hub / github.com/Niko1221/Strata / close_direct

Function close_direct

engine/src/core/expert_source.cpp:855–861  ·  view source on GitHub ↗

#286: an unbuffered file handle - a HANDLE on Windows, an O_DIRECT descriptor (as a pointer-sized integer) on Linux.

Source from the content-addressed store, hash-verified

853
854/// #286: an unbuffered file handle - a HANDLE on Windows, an O_DIRECT descriptor (as a pointer-sized integer) on Linux.
855void close_direct(void* h) {
856#if defined(_WIN32)
857 CloseHandle((HANDLE) h);
858#else
859 ::close((int) (intptr_t) h);
860#endif
861}
862
863#if defined(__linux__)
864/// #3237: how fast this drive serves the experts' reads the two ways the file tier can take them - O_DIRECT preads of

Callers 6

closeMethod · 0.70
open_directMethod · 0.70
open_prompt_directMethod · 0.70
recheck_unbufferedMethod · 0.70

Calls 1

closeFunction · 0.50

Tested by

no test coverage detected