2 * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the NewOS License.
12 struct VMUserAddressSpace
;
15 struct VMUserArea
: VMArea
{
16 VMUserArea(VMAddressSpace
* addressSpace
,
17 uint32 wiring
, uint32 protection
);
20 static VMUserArea
* Create(VMAddressSpace
* addressSpace
,
21 const char* name
, uint32 wiring
,
22 uint32 protection
, uint32 allocationFlags
);
23 static VMUserArea
* CreateReserved(VMAddressSpace
* addressSpace
,
24 uint32 flags
, uint32 allocationFlags
);
26 DoublyLinkedListLink
<VMUserArea
>& AddressSpaceLink()
27 { return fAddressSpaceLink
; }
28 const DoublyLinkedListLink
<VMUserArea
>& AddressSpaceLink() const
29 { return fAddressSpaceLink
; }
32 DoublyLinkedListLink
<VMUserArea
> fAddressSpaceLink
;
36 struct VMUserAreaGetLink
{
37 inline DoublyLinkedListLink
<VMUserArea
>* operator()(
38 VMUserArea
* area
) const
40 return &area
->AddressSpaceLink();
43 inline const DoublyLinkedListLink
<VMUserArea
>* operator()(
44 const VMUserArea
* area
) const
46 return &area
->AddressSpaceLink();
50 typedef DoublyLinkedList
<VMUserArea
, VMUserAreaGetLink
> VMUserAreaList
;
53 #endif // VM_USER_AREA_H