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

Function SysMapSharedMemory

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

* SysMapSharedMemory (ptr, key, hint) - Map Shared Memory * ptr - Pointer to pointer of mapped memory * key - Memory key * key - Address hint * * On Success - ptr > 0 * On Failure - ptr = 0 */

Source from the content-addressed store, hash-verified

1089 * On Failure - ptr = 0
1090 */
1091long SysMapSharedMemory(regs64_t* r){
1092 void** ptr = (void**)SC_ARG0(r);
1093 int64_t key = SC_ARG1(r);
1094 uint64_t hint = SC_ARG2(r);
1095
1096 *ptr = Memory::MapSharedMemory(key,Scheduler::GetCurrentProcess(), hint);
1097
1098 return 0;
1099}
1100
1101/*
1102 * SysUnmapSharedMemory (address, key) - Map Shared Memory

Callers

nothing calls this directly

Calls 2

GetCurrentProcessFunction · 0.85
MapSharedMemoryFunction · 0.50

Tested by

no test coverage detected