mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +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
|
@ -11,20 +11,20 @@ namespace Kernel::USB {
|
|||
|
||||
RefPtr<Transfer> Transfer::try_create(Pipe& pipe, u16 len)
|
||||
{
|
||||
auto vmobject = AnonymousVMObject::try_create_physically_contiguous_with_size(PAGE_SIZE);
|
||||
auto vmobject = Memory::AnonymousVMObject::try_create_physically_contiguous_with_size(PAGE_SIZE);
|
||||
if (!vmobject)
|
||||
return nullptr;
|
||||
|
||||
return AK::try_create<Transfer>(pipe, len, *vmobject);
|
||||
}
|
||||
|
||||
Transfer::Transfer(Pipe& pipe, u16 len, AnonymousVMObject& vmobject)
|
||||
Transfer::Transfer(Pipe& pipe, u16 len, Memory::AnonymousVMObject& vmobject)
|
||||
: m_pipe(pipe)
|
||||
, m_transfer_data_size(len)
|
||||
{
|
||||
// Initialize data buffer for transfer
|
||||
// This will definitely need to be refactored in the future, I doubt this will scale well...
|
||||
m_data_buffer = MemoryManager::the().allocate_kernel_region_with_vmobject(vmobject, PAGE_SIZE, "USB Transfer Buffer", Region::Access::Read | Region::Access::Write);
|
||||
m_data_buffer = MM.allocate_kernel_region_with_vmobject(vmobject, PAGE_SIZE, "USB Transfer Buffer", Memory::Region::Access::Read | Memory::Region::Access::Write);
|
||||
}
|
||||
|
||||
Transfer::~Transfer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue