| 151 | } |
| 152 | |
| 153 | U32 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 | |
| 162 | U32 KFile::pwrite(KThread* thread, U32 buffer, S64 offset, U32 len) { |
| 163 | BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(filePosMutex); |
no test coverage detected