2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
4 * Distributed under the terms of the MIT License.
6 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
7 * Distributed under the terms of the NewOS License.
9 #ifndef KERNEL_ARCH_X86_PAGING_X86_PAGING_STRUCTURES_H
10 #define KERNEL_ARCH_X86_PAGING_X86_PAGING_STRUCTURES_H
13 #include <SupportDefs.h>
20 struct X86PagingStructures
: DeferredDeletable
{
21 phys_addr_t pgdir_phys
;
23 CPUSet active_on_cpus
;
24 // mask indicating on which CPUs the map is currently used
26 X86PagingStructures();
27 virtual ~X86PagingStructures();
29 inline void AddReference();
30 inline void RemoveReference();
32 virtual void Delete() = 0;
37 X86PagingStructures::AddReference()
39 atomic_add(&ref_count
, 1);
44 X86PagingStructures::RemoveReference()
46 if (atomic_add(&ref_count
, -1) == 1)
51 #endif // KERNEL_ARCH_X86_PAGING_X86_PAGING_STRUCTURES_H