mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:35:06 +00:00
Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace
This commit is contained in:
parent
a1d7ebf85a
commit
93d98d4976
153 changed files with 473 additions and 467 deletions
|
@ -93,14 +93,14 @@ KResult InodeFile::ioctl(FileDescription& description, unsigned request, Userspa
|
|||
}
|
||||
}
|
||||
|
||||
KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& description, const Range& range, u64 offset, int prot, bool shared)
|
||||
KResultOr<Memory::Region*> InodeFile::mmap(Process& process, FileDescription& description, Memory::Range const& range, u64 offset, int prot, bool shared)
|
||||
{
|
||||
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
|
||||
RefPtr<InodeVMObject> vmobject;
|
||||
RefPtr<Memory::InodeVMObject> vmobject;
|
||||
if (shared)
|
||||
vmobject = SharedInodeVMObject::try_create_with_inode(inode());
|
||||
vmobject = Memory::SharedInodeVMObject::try_create_with_inode(inode());
|
||||
else
|
||||
vmobject = PrivateInodeVMObject::try_create_with_inode(inode());
|
||||
vmobject = Memory::PrivateInodeVMObject::try_create_with_inode(inode());
|
||||
if (!vmobject)
|
||||
return ENOMEM;
|
||||
return process.space().allocate_region_with_vmobject(range, vmobject.release_nonnull(), offset, description.absolute_path(), prot, shared);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue