MCPcopy Create free account
hub / github.com/SamoZ256/hydra / UnmapProcessCodeMemory

Method UnmapProcessCodeMemory

src/core/horizon/kernel/kernel.cpp:1375–1388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1373}
1374
1375result_t Kernel::UnmapProcessCodeMemory(Process* process, vaddr_t dst_addr,
1376 vaddr_t src_addr, u64 size) {
1377 LOG_DEBUG(Kernel,
1378 "UnmapProcessCodeMemory called (process: {}, dst_addr: 0x{:08x}, "
1379 "src_addr: 0x{:08x}, size: {})",
1380 process->GetDebugName(), dst_addr, src_addr, size);
1381
1382 // TODO: verify that src_addr is the same as the one used in MapMemory?
1383 (void)src_addr;
1384
1385 process->GetMmu()->Unmap(Range<vaddr_t>::FromSize(dst_addr, size));
1386
1387 return RESULT_SUCCESS;
1388}
1389
1390void Kernel::TryAcquireMutex(Process* crnt_process, IThread* thread) {
1391 auto mutex = reinterpret_cast<u32*>(thread->mutex_wait_addr);

Callers

nothing calls this directly

Calls 2

GetDebugNameMethod · 0.80
UnmapMethod · 0.45

Tested by

no test coverage detected