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

Method pread

source/kernel/kfile.cpp:153–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153U32 KFile::pread(KThread* thread, U32 buffer, S64 offset, U32 len) {
154 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(filePosMutex);
155 S64 previousOffset = this->openFile->getFilePointer();
156 this->openFile->seek(offset);
157 U32 result = this->openFile->read(thread, buffer, len);
158 this->openFile->seek(previousOffset);
159 return result;
160}
161
162U32 KFile::pwrite(KThread* thread, U32 buffer, S64 offset, U32 len) {
163 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(filePosMutex);

Callers 1

pread64Method · 0.80

Calls 3

getFilePointerMethod · 0.45
seekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected