* SysCreateSharedMemory (key, size, flags, recipient) - Create Shared Memory * key - Pointer to memory key * size - memory size * flags - flags * recipient - (if private flag) PID of the process that can access memory * * On Success - Return 0, key greater than 1 * On Failure - Return -1, key null */
| 1067 | * On Failure - Return -1, key null |
| 1068 | */ |
| 1069 | long SysCreateSharedMemory(regs64_t* r){ |
| 1070 | int64_t* key = (int64_t*)SC_ARG0(r); |
| 1071 | uint64_t size = SC_ARG1(r); |
| 1072 | uint64_t flags = SC_ARG2(r); |
| 1073 | uint64_t recipient = SC_ARG3(r); |
| 1074 | |
| 1075 | *key = Memory::CreateSharedMemory(size, flags, Scheduler::GetCurrentProcess()->pid, recipient); |
| 1076 | |
| 1077 | if(!*key) return -1; // Failed |
| 1078 | |
| 1079 | return 0; |
| 1080 | } |
| 1081 | |
| 1082 | /* |
| 1083 | * SysMapSharedMemory (ptr, key, hint) - Map Shared Memory |
nothing calls this directly
no test coverage detected