* Moved some definitions from vm_types.h that functions in vm.h need as

arguments into vm.h.
* This should fix the broken build from earlier - thanks Stefano for the note!
* That also allowed to clean some other includes a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22331 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-09-27 13:01:18 +00:00
parent 9ef250072b
commit 5c4ed86b56
6 changed files with 54 additions and 55 deletions
+52
View File
@@ -23,6 +23,58 @@ struct vm_address_space;
struct vnode;
// additional protection flags
// Note: the VM probably won't support all combinations - it will try
// its best, but create_area() will fail if it has to.
// Of course, the exact behaviour will be documented somewhere...
#define B_EXECUTE_AREA 0x04
#define B_STACK_AREA 0x08
// "stack" protection is not available on most platforms - it's used
// to only commit memory as needed, and have guard pages at the
// bottom of the stack.
// "execute" protection is currently ignored, but nevertheless, you
// should use it if you require to execute code in that area.
#define B_KERNEL_EXECUTE_AREA 0x40
#define B_KERNEL_STACK_AREA 0x80
#define B_USER_PROTECTION \
(B_READ_AREA | B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA)
#define B_KERNEL_PROTECTION \
(B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_KERNEL_EXECUTE_AREA \
| B_KERNEL_STACK_AREA)
#define B_OVERCOMMITTING_AREA 0x1000
// ToDo: this is not really a protection flag, but since the "protection"
// field is the only flag field, we currently use it for this.
// A cleaner approach would be appreciated - maybe just an official generic
// flags region in the protection field.
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
#define B_KERNEL_AREA_FLAGS \
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA)
// flags for vm_get_physical_page()
enum {
PHYSICAL_PAGE_NO_WAIT = 0,
PHYSICAL_PAGE_CAN_WAIT,
};
// mapping argument for several internal VM functions
enum {
REGION_NO_PRIVATE_MAP = 0,
REGION_PRIVATE_MAP
};
enum {
// ToDo: these are here only temporarily - it's a private
// addition to the BeOS create_area() lock flags
B_ALREADY_WIRED = 6,
};
#define MEMORY_TYPE_SHIFT 28
#ifdef __cplusplus
extern "C" {
#endif
-51
View File
@@ -232,55 +232,4 @@ typedef struct vm_store_ops {
void (*release_ref)(struct vm_store *backing_store);
} vm_store_ops;
// args for the create_area funcs
enum {
REGION_NO_PRIVATE_MAP = 0,
REGION_PRIVATE_MAP
};
enum {
// ToDo: these are here only temporarily - it's a private
// addition to the BeOS create_area() lock flags
B_ALREADY_WIRED = 6,
};
enum {
PHYSICAL_PAGE_NO_WAIT = 0,
PHYSICAL_PAGE_CAN_WAIT,
};
#define MEMORY_TYPE_SHIFT 28
// additional protection flags
// Note: the VM probably won't support all combinations - it will try
// its best, but create_area() will fail if it has to.
// Of course, the exact behaviour will be documented somewhere...
#define B_EXECUTE_AREA 0x04
#define B_STACK_AREA 0x08
// "stack" protection is not available on most platforms - it's used
// to only commit memory as needed, and have guard pages at the
// bottom of the stack.
// "execute" protection is currently ignored, but nevertheless, you
// should use it if you require to execute code in that area.
#define B_KERNEL_EXECUTE_AREA 0x40
#define B_KERNEL_STACK_AREA 0x80
#define B_USER_PROTECTION \
(B_READ_AREA | B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA)
#define B_KERNEL_PROTECTION \
(B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_KERNEL_EXECUTE_AREA \
| B_KERNEL_STACK_AREA)
#define B_OVERCOMMITTING_AREA 0x1000
// ToDo: this is not really a protection flag, but since the "protection"
// field is the only flag field, we currently use it for this.
// A cleaner approach would be appreciated - maybe just an official generic
// flags region in the protection field.
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
#define B_KERNEL_AREA_FLAGS \
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA)
#endif /* _KERNEL_VM_TYPES_H */
+1 -1
View File
@@ -16,7 +16,7 @@
#include <boot_device.h>
#include <smp.h>
#include <tls.h>
#include <vm_types.h>
#include <vm.h>
#include <arch_system_info.h>
#include <arch/x86/selector.h>
-1
View File
@@ -27,7 +27,6 @@
#include <vfs.h>
#include <vm.h>
#include <vm_address_space.h>
#include <vm_types.h>
#include <arch/cpu.h>
#include <arch/elf.h>
+1 -1
View File
@@ -17,12 +17,12 @@
#include <KernelExport.h>
#include <kernel.h>
#include <smp.h>
#include <util/AutoLock.h>
#include <util/DoublyLinkedList.h>
#include <util/OpenHashTable.h>
#include <vm.h>
#include <vm_types.h>
#include <vm_low_memory.h>
-1
View File
@@ -26,7 +26,6 @@
#include <vfs.h>
#include <vm.h>
#include <vm_address_space.h>
#include <vm_types.h>
#include <boot/kernel_args.h>
#include <util/khash.h>