MCPcopy Create free account
hub / github.com/Bananymous/banan-os / map_object

Method map_object

kernel/kernel/Memory/SharedMemoryObject.cpp:66–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 LockGuard _(m_mutex);
65
66 if (key != IPC_PRIVATE)
67 {
68 if (auto it = m_ids.find(key); it != m_ids.end())
69 {
70 if (shmflg & IPC_EXCL)
71 return BAN::Error::from_errno(EEXIST);
72
73 const auto& object = m_objects[it->value];
74 if (object->info.shm_segsz < size)
75 return BAN::Error::from_errno(EINVAL);
76
77 const int flags =
78 (shmflg & S_IRUSR ? O_RDONLY : 0) |

Callers 1

sys_smo_mapMethod · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected