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

Method msync

source/kernel/kprocess.cpp:1801–1810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1799}
1800
1801U32 KProcess::msync(KThread* thread, U32 addr, U32 len, U32 flags) {
1802 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(mappedFilesMutex);
1803 for (auto& n : this->mappedFiles) {
1804 std::shared_ptr<MappedFile> m = n.value;
1805 if (m->address<=addr && addr+len<m->address+m->len) {
1806 return m->file->pwrite(thread, addr, addr - m->address + m->offset, len);
1807 }
1808 }
1809 return -K_ENOMEM;
1810}
1811
1812U32 KProcess::writev(KThread* thread, FD handle, U32 iov, S32 iovcnt) {
1813 KFileDescriptorPtr fd = this->getFileDescriptor(handle);

Callers 1

syscall_msyncFunction · 0.80

Calls 1

pwriteMethod · 0.80

Tested by

no test coverage detected