kernel: Add constructors to SharedMemory
This commit is contained in:
parent
f150425222
commit
5aa042a5f2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user