1 |
/* |
/* Prototypes for VM syscalls. |
2 |
Copyright 1999-2002 Johan Rydberg, jrydberg@rtmk.org. |
Copyright 1999-2002 Johan Rydberg, jrydberg@rtmk.org. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
16 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
17 |
|
|
18 |
#ifndef __vm_syscall_h |
#ifndef __vm_syscall_h |
19 |
|
#define __vm_syscall_h 1 |
20 |
|
|
21 |
#include <rtmk/kern-return.h> |
#include <rtmk/kern-return.h> |
22 |
#include <rtmk/vm-param.h> |
#include <rtmk/vm-param.h> |
28 |
/* Map OBJECT at into the address space of TASK. If ANYWHERE_P is |
/* Map OBJECT at into the address space of TASK. If ANYWHERE_P is |
29 |
false we try to map the object at *OFFSETP, otherwise the kernel |
false we try to map the object at *OFFSETP, otherwise the kernel |
30 |
selects the location in the address space. */ |
selects the location in the address space. */ |
|
|
|
31 |
extern kern_return_t vm_map (struct task *task, struct vm_object *object, |
extern kern_return_t vm_map (struct task *task, struct vm_object *object, |
32 |
vm_offset_t *offsetp, vm_size_t size, bool anywhere_p, |
vm_offset_t *offsetp, vm_size_t size, |
33 |
vm_prot_t protection, vm_inherit_t inherit); |
bool anywhere_p, vm_prot_t protection, |
34 |
|
vm_inherit_t inherit); |
35 |
|
|
36 |
/* Allocate SIZE bytes in the address space of TASK. If ANYWHERE_P is |
/* Allocate SIZE bytes in the address space of TASK. If ANYWHERE_P is |
37 |
false, enter new object at *OFFSETP, otherwise use suitable location. */ |
false, enter new object at *OFFSETP, otherwise use suitable location. */ |
|
|
|
38 |
extern kern_return_t vm_allocate (struct task *task, vm_size_t size, |
extern kern_return_t vm_allocate (struct task *task, vm_size_t size, |
39 |
vm_offset_t *offsetp, bool anywhere_p); |
vm_offset_t *offsetp, bool anywhere_p); |
40 |
|
|
41 |
|
/* Deallocate SIZE bytes at OFFSET in TASK's address space. */ |
42 |
|
extern kern_return_t vm_deallocate (struct task *task, vm_offset_t offset, |
43 |
|
vm_size_t size); |
44 |
|
|
45 |
|
|
46 |
|
/* Sets the protection for address region [OFFSET, OFFSET+SIZE) |
47 |
|
in TASK to PROTECTION. If SETMAX_P is specified, the maximum |
48 |
|
protection is to be set; otherwise, only the current protection |
49 |
|
is affected. */ |
50 |
|
extern kern_return_t vm_protect (struct task *task, vm_offset_t offset, |
51 |
|
vm_size_t size, vm_prot_t protection, |
52 |
|
int setmax_p); |
53 |
|
|
54 |
#endif /* vm-syscall.h */ |
#endif /* vm-syscall.h */ |