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

Function CanModifySharedMemory

Kernel/src/sharedmem.cpp:42–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 }
41
42 int CanModifySharedMemory(pid_t pid, int64_t key){
43 shared_mem_t* sMem = nullptr;
44 if((sMem = GetSharedMemory(key))){
45 if((sMem->owner = pid)) return 1;
46 }
47
48 return 0;
49 }
50
51 int64_t CreateSharedMemory(uint64_t size, uint64_t flags, pid_t owner, pid_t recipient){
52 acquireLock(&lock);

Callers 1

SysDestroySharedMemoryFunction · 0.85

Calls 1

GetSharedMemoryFunction · 0.85

Tested by

no test coverage detected