MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / pwrite

Method pwrite

source/kernel/kfile.cpp:162–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162U32 KFile::pwrite(KThread* thread, U32 buffer, S64 offset, U32 len) {
163 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(filePosMutex);
164 S64 previousOffset = this->openFile->getFilePointer();
165 this->openFile->seek(offset);
166 U32 result = this->openFile->write(thread, buffer, len);
167 this->openFile->seek(previousOffset);
168 return result;
169}
170
171U32 KFile::preadNative(U8* buffer, S64 offset, U32 len) {
172 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(filePosMutex);

Callers 2

msyncMethod · 0.80
pwrite64Method · 0.80

Calls 3

getFilePointerMethod · 0.45
seekMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected