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

Method shmdt

source/kernel/kprocess.cpp:2658–2668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2656}
2657
2658U32 KProcess::shmdt(U32 shmaddr) {
2659 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(attachedShmMutex);
2660
2661 std::shared_ptr<AttachedSHM> attached = this->attachedShm[shmaddr];
2662 if (attached) {
2663 memory->unmap(shmaddr, (U32)attached->shm->pages.size());
2664 this->attachedShm.remove(shmaddr);
2665 return 0;
2666 }
2667 return -K_EINVAL;
2668}
2669
2670void KProcess::iterateThreadIds(std::function<bool(U32)> callback) {
2671 std::vector<U32> threadIds;

Callers

nothing calls this directly

Calls 3

unmapMethod · 0.80
sizeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected