_PROTOTYPE( void *mmap, (void *, size_t, int, int, int, off_t));
_PROTOTYPE( int munmap, (void *, size_t));
_PROTOTYPE( int munmap_text, (void *, size_t));
-_PROTOTYPE( void *vm_remap, (int d, int s, void *da, void *sa, size_t si));
+_PROTOTYPE( void *vm_remap, (endpoint_t d, endpoint_t s, void *da,
+ void *sa, size_t si));
_PROTOTYPE( int vm_unmap, (endpoint_t endpt, void *addr));
_PROTOTYPE( unsigned long vm_getphys, (endpoint_t endpt, void *addr));
-_PROTOTYPE( u8_t vm_getrefcount, (int endpt, void *addr));
+_PROTOTYPE( u8_t vm_getrefcount, (endpoint_t endpt, void *addr));
#endif /* _MMAN_H */
return _syscall(VM_PROC_NR, VM_MUNMAP_TEXT, &m);
}
-PUBLIC void *vm_remap(int d, int s, void *da, void *sa, size_t size)
+PUBLIC void *vm_remap(endpoint_t d,
+ endpoint_t s,
+ void *da,
+ void *sa,
+ size_t size)
{
message m;
int r;
return (void *) m.VMRE_RETA;
}
-PUBLIC int vm_unmap(int endpt, void *addr)
+PUBLIC int vm_unmap(endpoint_t endpt, void *addr)
{
message m;
return m.VMPHYS_RETA;
}
-PUBLIC u8_t vm_getrefcount(int endpt, void *addr)
+PUBLIC u8_t vm_getrefcount(endpoint_t endpt, void *addr)
{
message m;
int r;
*===========================================================================*/
PUBLIC int do_remap(message *m)
{
- int d, dn, s, sn;
+ int dn, sn;
vir_bytes da, sa, startv;
size_t size;
struct vir_region *vr, *region;
struct vmproc *dvmp, *svmp;
int r;
- d = m->VMRE_D;
- s = m->VMRE_S;
da = (vir_bytes) m->VMRE_DA;
sa = (vir_bytes) m->VMRE_SA;
size = m->VMRE_SIZE;
- if ((r = vm_isokendpt(d, &dn)) != OK)
+ if ((r = vm_isokendpt((endpoint_t) m->VMRE_D, &dn)) != OK)
return EINVAL;
- if ((r = vm_isokendpt(s, &sn)) != OK)
+ if ((r = vm_isokendpt((endpoint_t) m->VMRE_S, &sn)) != OK)
return EINVAL;
dvmp = &vmproc[dn];