headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / arch / x86 / paging / 64bit / X86PagingStructures64Bit.cpp
blobaeecb239e7f291f6f9a67a553a6b6f9a21b863fa
1 /*
2 * Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "paging/64bit/X86PagingStructures64Bit.h"
9 #include <stdlib.h>
10 #include <string.h>
12 #include <KernelExport.h>
14 #include <int.h>
16 #include "paging/64bit/X86PagingMethod64Bit.h"
19 X86PagingStructures64Bit::X86PagingStructures64Bit()
21 fVirtualPML4(NULL)
26 X86PagingStructures64Bit::~X86PagingStructures64Bit()
28 // Free the PML4.
29 free(fVirtualPML4);
33 void
34 X86PagingStructures64Bit::Init(uint64* virtualPML4, phys_addr_t physicalPML4)
36 fVirtualPML4 = virtualPML4;
37 pgdir_phys = physicalPML4;
41 void
42 X86PagingStructures64Bit::Delete()
44 if (are_interrupts_enabled())
45 delete this;
46 else
47 deferred_delete(this);