MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / SysDestroySharedMemory

Function SysDestroySharedMemory

Kernel/src/arch/x86_64/syscalls.cpp:1135–1143  ·  view source on GitHub ↗

* SysDestroySharedMemory (key) - Destroy Shared Memory * key - Memory key * * On Success - return 0 * On Failure - return -1 */

Source from the content-addressed store, hash-verified

1133 * On Failure - return -1
1134 */
1135long SysDestroySharedMemory(regs64_t* r){
1136 uint64_t key = SC_ARG0(r);
1137
1138 if(Memory::CanModifySharedMemory(Scheduler::GetCurrentProcess()->pid, key)){
1139 Memory::DestroySharedMemory(key);
1140 } else return -1;
1141
1142 return 0;
1143}
1144
1145/*
1146 * SysSocket (domain, type, protocol) - Create socket

Callers

nothing calls this directly

Calls 3

CanModifySharedMemoryFunction · 0.85
GetCurrentProcessFunction · 0.85
DestroySharedMemoryFunction · 0.50

Tested by

no test coverage detected