Kernel: Add a move() function
The standard C++ move() function.
This commit is contained in:
parent
f82fbbe60c
commit
e0aa552fae
6
kernel/include/utils/move.h
Normal file
6
kernel/include/utils/move.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
template <typename T> inline T&& move(T& lvalue)
|
||||||
|
{
|
||||||
|
return (T &&) lvalue;
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
#include "log/Log.h"
|
#include "log/Log.h"
|
||||||
#include "memory/PMM.h"
|
#include "memory/PMM.h"
|
||||||
#include "memory/VMM.h"
|
#include "memory/VMM.h"
|
||||||
|
#include "utils/move.h"
|
||||||
|
|
||||||
AddressSpace AddressSpace::create()
|
AddressSpace AddressSpace::create()
|
||||||
{
|
{
|
||||||
@ -11,7 +12,7 @@ AddressSpace AddressSpace::create()
|
|||||||
result.m_pml4 = (PageTable*)PMM::request_page();
|
result.m_pml4 = (PageTable*)PMM::request_page();
|
||||||
result.m_cloned = false;
|
result.m_cloned = false;
|
||||||
VMM::install_kernel_page_directory_into_address_space(result);
|
VMM::install_kernel_page_directory_into_address_space(result);
|
||||||
return result;
|
return move(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressSpace::destroy()
|
void AddressSpace::destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user