mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 01:31:55 +00:00
Kernel: SharedMemory should implement mmap().
This commit is contained in:
parent
237628a7a6
commit
a4e48dce77
Notes:
sideshowbarker
2024-07-19 14:02:22 +09:00
Author: https://github.com/awesomekling
Commit: a4e48dce77
3 changed files with 8 additions and 6 deletions
|
@ -324,12 +324,6 @@ KResultOr<Region*> FileDescriptor::mmap(Process& process, LinearAddress laddr, s
|
|||
if (m_file)
|
||||
return m_file->mmap(process, laddr, offset, size);
|
||||
|
||||
if (is_shared_memory()) {
|
||||
if (!shared_memory()->vmo())
|
||||
return KResult(-ENODEV);
|
||||
return process.allocate_region_with_vmo(laddr, size, *shared_memory()->vmo(), offset, shared_memory()->name(), true, true);
|
||||
}
|
||||
|
||||
if (!is_fsfile())
|
||||
return KResult(-ENODEV);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue