| 2656 | } |
| 2657 | |
| 2658 | U32 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 | |
| 2670 | void KProcess::iterateThreadIds(std::function<bool(U32)> callback) { |
| 2671 | std::vector<U32> threadIds; |