2 * Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
12 #include <KernelExport.h>
15 #include <util/kernel_cpp.h>
23 area_id
Create(const char *name
, void **_virtualAddress
, uint32 spec
,
24 size_t size
, uint32 lock
, uint32 protection
);
25 area_id
Map(const char *name
, phys_addr_t physicalAddress
,
26 size_t numBytes
, uint32 spec
, uint32 protection
,
27 void **_virtualAddress
);
29 status_t
InitCheck() { return fArea
< B_OK
? (status_t
)fArea
: B_OK
; }
37 AreaKeeper::AreaKeeper()
44 AreaKeeper::~AreaKeeper()
52 AreaKeeper::Create(const char *name
, void **_virtualAddress
, uint32 spec
,
53 size_t size
, uint32 lock
, uint32 protection
)
55 fArea
= create_area(name
, _virtualAddress
, spec
, size
, lock
, protection
);
61 AreaKeeper::Map(const char *name
, phys_addr_t physicalAddress
, size_t numBytes
,
62 uint32 spec
, uint32 protection
, void **_virtualAddress
)
64 fArea
= map_physical_memory(name
, physicalAddress
, numBytes
, spec
,
65 protection
, _virtualAddress
);
76 #endif // AREA_KEEPER_H