2005-12-20 18:54:45 +03:00
|
|
|
/*
|
2008-07-17 02:55:17 +04:00
|
|
|
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2005-12-20 18:54:45 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
* Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_VM_ADDRESS_SPACE_H
|
|
|
|
#define _KERNEL_VM_ADDRESS_SPACE_H
|
|
|
|
|
|
|
|
|
2007-09-27 16:21:33 +04:00
|
|
|
#include <OS.h>
|
|
|
|
|
2005-12-20 18:54:45 +03:00
|
|
|
|
|
|
|
struct kernel_args;
|
2007-09-27 16:21:33 +04:00
|
|
|
struct vm_address_space;
|
2005-12-20 18:54:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
status_t vm_address_space_init(void);
|
|
|
|
status_t vm_address_space_init_post_sem(void);
|
|
|
|
|
2007-09-27 16:21:33 +04:00
|
|
|
void vm_delete_address_space(struct vm_address_space *aspace);
|
2005-12-20 18:54:45 +03:00
|
|
|
status_t vm_create_address_space(team_id id, addr_t base, addr_t size,
|
2007-09-27 16:21:33 +04:00
|
|
|
bool kernel, struct vm_address_space **_aspace);
|
2005-12-20 18:54:45 +03:00
|
|
|
status_t vm_delete_areas(struct vm_address_space *aspace);
|
2007-09-27 16:21:33 +04:00
|
|
|
struct vm_address_space *vm_get_kernel_address_space(void);
|
|
|
|
struct vm_address_space *vm_kernel_address_space(void);
|
2005-12-20 18:54:45 +03:00
|
|
|
team_id vm_kernel_address_space_id(void);
|
2007-09-27 16:21:33 +04:00
|
|
|
struct vm_address_space *vm_get_current_user_address_space(void);
|
2005-12-20 18:54:45 +03:00
|
|
|
team_id vm_current_user_address_space_id(void);
|
2008-07-17 02:55:17 +04:00
|
|
|
struct vm_address_space *vm_get_address_space(team_id team);
|
2007-09-27 16:21:33 +04:00
|
|
|
void vm_put_address_space(struct vm_address_space *aspace);
|
2008-10-08 01:39:19 +04:00
|
|
|
#define vm_swap_address_space(from, to) arch_vm_aspace_swap(from, to)
|
2005-12-20 18:54:45 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _KERNEL_VM_ADDRESS_SPACE_H */
|