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

Method writeFileLock

source/kernel/kfilelock.cpp:22–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "kfilelock.h"
21
22void KFileLock::writeFileLock(KThread* thread, U32 address, bool is64) {
23 KMemory* memory = thread->memory;
24
25 if (!is64) {
26 memory->writew(address, this->l_type);address+=2;
27 memory->writew(address, this->l_whence); address += 2;
28 memory->writed(address, (U32)this->l_start); address += 4;
29 memory->writed(address, (U32)this->l_len); address += 4;
30 memory->writed(address, (U32)this->l_pid);
31 } else {
32 memory->writew(address, this->l_type); address += 2;
33 memory->writew(address, this->l_whence); address += 2;
34 memory->writeq(address, this->l_start); address += 8;
35 memory->writeq(address, this->l_len); address += 8;
36 memory->writed(address, this->l_pid);
37 }
38}
39
40void KFileLock::readFileLock(KThread* thread, U32 address, bool is64) {
41 KMemory* memory = thread->memory;

Callers 1

fcntrlMethod · 0.80

Calls 3

writeqMethod · 0.80
writewMethod · 0.45
writedMethod · 0.45

Tested by

no test coverage detected