kernel: Add constructors to SharedMemory

This commit is contained in:
apio 2023-08-03 10:31:58 +02:00
parent f150425222
commit 5aa042a5f2
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -14,6 +14,9 @@ struct SharedMemory
SharedPtr<Device> device {};
int refs { 0 };
SharedMemory() = default;
SharedMemory(SharedMemory&&) = default;
static Result<u64> create(u8* mem, off_t offset, usize count);
Result<void> grow_forward(u8* mem, usize count);
@ -22,6 +25,8 @@ struct SharedMemory
Result<void> map(u64 virt, int flags, off_t offset, usize count);
void free();
~SharedMemory() = default;
};
extern HashMap<u64, SharedMemory> g_shared_memory_map;