sys_physcopy.c

Go to the documentation of this file.
00001 #include "syslib.h"
00002 
00003 PUBLIC int sys_physcopy(src_proc, src_seg, src_vir, 
00004         dst_proc, dst_seg, dst_vir, bytes)
00005 int src_proc;                   /* source process */
00006 int src_seg;                    /* source memory segment */
00007 vir_bytes src_vir;              /* source virtual address */
00008 int dst_proc;                   /* destination process */
00009 int dst_seg;                    /* destination memory segment */
00010 vir_bytes dst_vir;              /* destination virtual address */
00011 phys_bytes bytes;               /* how many bytes */
00012 {
00013 /* Transfer a block of data.  The source and destination can each either be a
00014  * process number or SELF (to indicate own process number). Virtual addresses 
00015  * are offsets within LOCAL_SEG (text, stack, data), REMOTE_SEG, or BIOS_SEG. 
00016  * Physicall addressing is also possible with PHYS_SEG.
00017  */
00018 
00019   message copy_mess;
00020 
00021   if (bytes == 0L) return(OK);
00022   copy_mess.CP_SRC_ENDPT = src_proc;
00023   copy_mess.CP_SRC_SPACE = src_seg;
00024   copy_mess.CP_SRC_ADDR = (long) src_vir;
00025   copy_mess.CP_DST_ENDPT = dst_proc;
00026   copy_mess.CP_DST_SPACE = dst_seg;
00027   copy_mess.CP_DST_ADDR = (long) dst_vir;
00028   copy_mess.CP_NR_BYTES = (long) bytes;
00029   return(_taskcall(SYSTASK, SYS_PHYSCOPY, &copy_mess));
00030 }

Generated on Fri Apr 14 22:57:28 2006 for minix by  doxygen 1.4.6