| 20 | #include "kfilelock.h" |
| 21 | |
| 22 | void 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 | |
| 40 | void KFileLock::readFileLock(KThread* thread, U32 address, bool is64) { |
| 41 | KMemory* memory = thread->memory; |