/[rtmk]/rtmk/vm-syscall.c
ViewVC logotype

Diff of /rtmk/vm-syscall.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jrydberg, Wed Feb 6 19:57:00 2002 UTC revision 1.6 by jrydberg, Sun Feb 24 23:09:48 2002 UTC
# Line 30  Foundation, Inc., 59 Temple Place - Suit Line 30  Foundation, Inc., 59 Temple Place - Suit
30  /* 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
31     false we try to map the object at *OFFSETP, otherwise the kernel     false we try to map the object at *OFFSETP, otherwise the kernel
32     selects the location in the address space.  */     selects the location in the address space.  */
   
33  kern_return_t  kern_return_t
34  vm_map (struct task *task, struct vm_object *object, vm_offset_t *offsetp,  vm_map (struct task *task, struct vm_object *object, vm_offset_t *offsetp,
35          vm_size_t size, bool anywhere_p, vm_prot_t protection,          vm_size_t size, bool anywhere_p, vm_prot_t protection,
# Line 46  vm_map (struct task *task, struct vm_obj Line 45  vm_map (struct task *task, struct vm_obj
45    
46  /* 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
47     false, enter new object at *OFFSETP, otherwise use suitable location.  */     false, enter new object at *OFFSETP, otherwise use suitable location.  */
   
48  kern_return_t  kern_return_t
49  vm_allocate (struct task *task, vm_size_t size, vm_offset_t *offsetp,  vm_allocate (struct task *task, vm_size_t size, vm_offset_t *offsetp,
50               bool anywhere_p)               bool anywhere_p)
# Line 71  vm_allocate (struct task *task, vm_size_ Line 69  vm_allocate (struct task *task, vm_size_
69    return KERN_SUCCESS;    return KERN_SUCCESS;
70  }  }
71    
72    /* Deallocate SIZE bytes at OFFSET in TASK's address space.  */
73    kern_return_t
74    vm_deallocate (struct task *task, vm_offset_t offset, vm_size_t size)
75    {
76      return vm_map_deallocate (task->map, vm_trunc_page (offset),
77                                vm_round_page (size));
78    }
79    
80    /* Sets the protection for address region [OFFSET, OFFSET+SIZE)
81       in TASK to PROTECTION. If SETMAX_P is specified, the maximum
82       protection is to be set; otherwise, only the current protection
83       is affected.  */
84    kern_return_t
85    vm_protect (struct task *task, vm_offset_t offset, vm_size_t size,
86                vm_prot_t protection, int setmax_p)
87    {
88      return vm_map_protect (task->map, vm_trunc_page (offset),
89                             vm_round_page (size), protection, setmax_p);
90    }
91    
92  /* Write into TASKs address space at offset DST_OFFSET, from current  /* Write into TASKs address space at offset DST_OFFSET, from current
93     tasks address space at SRC_OFFSET.  Copy LENGTH bytes.  */     tasks address space at SRC_OFFSET.  Copy LENGTH bytes.  */
94    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26