Definitions were doubled in vm_translation_map.h and arch/vm_translation_map.h.
The former now only contains the structure definitions, while the other one contains the arch-specific function prototypes (which do not have the arch_ prefix). Added a ToDo comment to remember cleaning this up one day. Made all headers C++ safe, simplified where possible. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5197 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <kernel.h>
|
||||
#include <lock.h>
|
||||
|
||||
|
||||
struct kernel_args;
|
||||
|
||||
|
||||
@@ -20,6 +21,7 @@ typedef struct vm_translation_map_struct {
|
||||
struct vm_translation_map_arch_info_struct *arch_data;
|
||||
} vm_translation_map;
|
||||
|
||||
|
||||
// table of operations the vm may want to do to this mapping
|
||||
typedef struct vm_translation_map_ops_struct {
|
||||
void (*destroy)(vm_translation_map *);
|
||||
@@ -36,15 +38,10 @@ typedef struct vm_translation_map_ops_struct {
|
||||
int (*put_physical_page)(addr virtual_address);
|
||||
} vm_translation_map_ops;
|
||||
|
||||
int vm_translation_map_create(vm_translation_map *new_map, bool kernel);
|
||||
int vm_translation_map_module_init(struct kernel_args *ka);
|
||||
int vm_translation_map_module_init2(struct kernel_args *ka);
|
||||
void vm_translation_map_module_init_post_sem(struct kernel_args *ka);
|
||||
// quick function to map a page in regardless of map context. Used in VM initialization,
|
||||
// before most vm data structures exist
|
||||
int vm_translation_map_quick_map(struct kernel_args *ka, addr va, addr pa, unsigned int attributes, addr (*get_free_page)(kernel_args *));
|
||||
|
||||
// quick function to return the physical pgdir of a mapping, needed for a context switch
|
||||
addr vm_translation_map_get_pgdir(vm_translation_map *map);
|
||||
// ToDo: fix this
|
||||
// unlike the usual habit, the VM translation map functions are
|
||||
// arch-specific but do not have the arch_ prefix.
|
||||
#include <arch/vm_translation_map.h>
|
||||
|
||||
#endif /* KERNEL_VM_TRANSLATION_MAP_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user