. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / syslib / sys_umap.c
blob87f83aeab2bbc18f64632688494f7e46ce7bafe3
1 #include "syslib.h"
3 /*===========================================================================*
4 * sys_umap *
5 *===========================================================================*/
6 PUBLIC int sys_umap(proc_nr, seg, vir_addr, bytes, phys_addr)
7 int proc_nr; /* process number to do umap for */
8 int seg; /* T, D, or S segment */
9 vir_bytes vir_addr; /* address in bytes with segment*/
10 vir_bytes bytes; /* number of bytes to be copied */
11 phys_bytes *phys_addr; /* placeholder for result */
13 message m;
14 int result;
16 m.CP_SRC_ENDPT = proc_nr;
17 m.CP_SRC_SPACE = seg;
18 m.CP_SRC_ADDR = vir_addr;
19 m.CP_NR_BYTES = bytes;
21 result = _taskcall(SYSTASK, SYS_UMAP, &m);
22 *phys_addr = m.CP_DST_ADDR;
23 return(result);