From: Ben Gras Date: Fri, 3 Mar 2006 09:44:55 +0000 (+0000) Subject: . rename message fields to endpoint variants X-Git-Tag: v3.1.2a~315 X-Git-Url: http://zhaoyanbai.com/repos/icons/valid-xhtml10.png?a=commitdiff_plain;h=5d7f5fccf5aa60463f26723a7380761691959020;p=minix.git . rename message fields to endpoint variants . remove or optionalify some pci debugging stuff --- diff --git a/lib/other/sys_eniop.c b/lib/other/sys_eniop.c index d3d5a9231..5cda897b4 100644 --- a/lib/other/sys_eniop.c +++ b/lib/other/sys_eniop.c @@ -7,7 +7,7 @@ PUBLIC int sys_enable_iop(proc_nr) int proc_nr; /* number of process to allow I/O */ { message m_iop; - m_iop.PROC_NR = proc_nr; + m_iop.IO_ENDPT = proc_nr; return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop); } diff --git a/lib/syslib/pci_dev_name.c b/lib/syslib/pci_dev_name.c index 0757d3976..e5ae0475d 100644 --- a/lib/syslib/pci_dev_name.c +++ b/lib/syslib/pci_dev_name.c @@ -40,7 +40,9 @@ u16_t did; * terminated. */ +#if DEBUG printf("pci_dev_name: got name %s\n", name); +#endif return name; } diff --git a/lib/syslib/pci_first_dev.c b/lib/syslib/pci_first_dev.c index 6f3b3b894..9fd06de75 100644 --- a/lib/syslib/pci_first_dev.c +++ b/lib/syslib/pci_first_dev.c @@ -26,8 +26,10 @@ u16_t *didp; *devindp= m.m1_i1; *vidp= m.m1_i2; *didp= m.m1_i3; +#if DEBUG printf("pci_first_dev: got device %d, %04x/%04x\n", *devindp, *vidp, *didp); +#endif return 1; } if (m.m_type != 0) diff --git a/lib/syslib/pci_init1.c b/lib/syslib/pci_init1.c index a56516476..d46e4807b 100644 --- a/lib/syslib/pci_init1.c +++ b/lib/syslib/pci_init1.c @@ -23,7 +23,6 @@ char *name; r= findproc("pci", &pci_procnr); if (r != 0) panic("pci", "pci_init1: findproc failed for 'pci'", r); - printf("'pci' is at %d\n", pci_procnr); m.m_type= BUSC_PCI_INIT; len= strlen(name); diff --git a/lib/syslib/sys_abort.c b/lib/syslib/sys_abort.c index 94876cb52..ab19af718 100755 --- a/lib/syslib/sys_abort.c +++ b/lib/syslib/sys_abort.c @@ -11,7 +11,7 @@ PUBLIC int sys_abort(int how, ...) va_start(ap, how); if ((m.ABRT_HOW = how) == RBT_MONITOR) { - m.ABRT_MON_PROC = va_arg(ap, int); + m.ABRT_MON_ENDPT = va_arg(ap, int); m.ABRT_MON_ADDR = va_arg(ap, char *); m.ABRT_MON_LEN = va_arg(ap, size_t); } diff --git a/lib/syslib/sys_endsig.c b/lib/syslib/sys_endsig.c index dde75bf53..8385b4d86 100755 --- a/lib/syslib/sys_endsig.c +++ b/lib/syslib/sys_endsig.c @@ -9,7 +9,7 @@ int proc_nr; /* process number */ message m; int result; - m.SIG_PROC = proc_nr; + m.SIG_ENDPT = proc_nr; result = _taskcall(SYSTASK, SYS_ENDKSIG, &m); return(result); } diff --git a/lib/syslib/sys_eniop.c b/lib/syslib/sys_eniop.c index 248ab8e33..2a8f4f04a 100644 --- a/lib/syslib/sys_eniop.c +++ b/lib/syslib/sys_eniop.c @@ -3,11 +3,11 @@ /*===========================================================================* * sys_enable_iop * *===========================================================================*/ -PUBLIC int sys_enable_iop(proc_nr) -int proc_nr; /* number of process to allow I/O */ +PUBLIC int sys_enable_iop(proc_nr_e) +int proc_nr_e; /* number of process to allow I/O */ { message m_iop; - m_iop.PROC_NR = proc_nr; + m_iop.IO_ENDPT = proc_nr_e; return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop); } diff --git a/lib/syslib/sys_exec.c b/lib/syslib/sys_exec.c index f528af911..836b27274 100755 --- a/lib/syslib/sys_exec.c +++ b/lib/syslib/sys_exec.c @@ -10,7 +10,7 @@ vir_bytes initpc; message m; - m.PR_PROC_NR = proc; + m.PR_ENDPT = proc; m.PR_STACK_PTR = ptr; m.PR_NAME_PTR = prog_name; m.PR_IP_PTR = (char *)initpc; diff --git a/lib/syslib/sys_exit.c b/lib/syslib/sys_exit.c index 645c920ee..ff8b04fa6 100644 --- a/lib/syslib/sys_exit.c +++ b/lib/syslib/sys_exit.c @@ -12,6 +12,6 @@ int proc; /* which process has exited */ */ message m; - m.PR_PROC_NR = proc; + m.PR_ENDPT = proc; return(_taskcall(SYSTASK, SYS_EXIT, &m)); } diff --git a/lib/syslib/sys_fork.c b/lib/syslib/sys_fork.c index b93734491..f42cb295b 100755 --- a/lib/syslib/sys_fork.c +++ b/lib/syslib/sys_fork.c @@ -1,14 +1,18 @@ #include "syslib.h" -PUBLIC int sys_fork(parent, child) +PUBLIC int sys_fork(parent, child, child_endpoint) int parent; /* process doing the fork */ int child; /* which proc has been created by the fork */ +int *child_endpoint; { /* A process has forked. Tell the kernel. */ message m; + int r; - m.PR_PPROC_NR = parent; - m.PR_PROC_NR = child; - return(_taskcall(SYSTASK, SYS_FORK, &m)); + m.PR_ENDPT = parent; + m.PR_SLOT = child; + r = _taskcall(SYSTASK, SYS_FORK, &m); + *child_endpoint = m.PR_ENDPT; + return r; } diff --git a/lib/syslib/sys_getinfo.c b/lib/syslib/sys_getinfo.c index f0f46757d..dd4bc43b9 100644 --- a/lib/syslib/sys_getinfo.c +++ b/lib/syslib/sys_getinfo.c @@ -13,11 +13,11 @@ int len2; /* length or process nr */ message m; m.I_REQUEST = request; - m.I_PROC_NR = SELF; /* always store values at caller */ + m.I_ENDPT = SELF; /* always store values at caller */ m.I_VAL_PTR = ptr; m.I_VAL_LEN = len; m.I_VAL_PTR2 = ptr2; - m.I_VAL_LEN2 = len2; + m.I_VAL_LEN2_E = len2; return(_taskcall(SYSTASK, SYS_GETINFO, &m)); } diff --git a/lib/syslib/sys_getsig.c b/lib/syslib/sys_getsig.c index afe9cdcb9..828e118e4 100644 --- a/lib/syslib/sys_getsig.c +++ b/lib/syslib/sys_getsig.c @@ -11,7 +11,7 @@ sigset_t *k_sig_map; /* return signal map here */ int result; result = _taskcall(SYSTASK, SYS_GETKSIG, &m); - *k_proc_nr = m.SIG_PROC; + *k_proc_nr = m.SIG_ENDPT; *k_sig_map = (sigset_t) m.SIG_MAP; return(result); } diff --git a/lib/syslib/sys_kill.c b/lib/syslib/sys_kill.c index 19f016029..31366498c 100755 --- a/lib/syslib/sys_kill.c +++ b/lib/syslib/sys_kill.c @@ -7,7 +7,7 @@ int signr; /* signal number: 1 - 16 */ /* A proc has to be signaled via MM. Tell the kernel. */ message m; - m.SIG_PROC = proc; + m.SIG_ENDPT = proc; m.SIG_NUMBER = signr; return(_taskcall(SYSTASK, SYS_KILL, &m)); } diff --git a/lib/syslib/sys_newmap.c b/lib/syslib/sys_newmap.c index 3db37f470..8a4dce006 100755 --- a/lib/syslib/sys_newmap.c +++ b/lib/syslib/sys_newmap.c @@ -8,7 +8,7 @@ struct mem_map *ptr; /* pointer to new map */ message m; - m.PR_PROC_NR = proc; + m.PR_ENDPT = proc; m.PR_MEM_PTR = (char *) ptr; return(_taskcall(SYSTASK, SYS_NEWMAP, &m)); } diff --git a/lib/syslib/sys_physcopy.c b/lib/syslib/sys_physcopy.c index 79f03beb0..c50aeaad3 100644 --- a/lib/syslib/sys_physcopy.c +++ b/lib/syslib/sys_physcopy.c @@ -19,10 +19,10 @@ phys_bytes bytes; /* how many bytes */ message copy_mess; if (bytes == 0L) return(OK); - copy_mess.CP_SRC_PROC_NR = src_proc; + copy_mess.CP_SRC_ENDPT = src_proc; copy_mess.CP_SRC_SPACE = src_seg; copy_mess.CP_SRC_ADDR = (long) src_vir; - copy_mess.CP_DST_PROC_NR = dst_proc; + copy_mess.CP_DST_ENDPT = dst_proc; copy_mess.CP_DST_SPACE = dst_seg; copy_mess.CP_DST_ADDR = (long) dst_vir; copy_mess.CP_NR_BYTES = (long) bytes; diff --git a/lib/syslib/sys_privctl.c b/lib/syslib/sys_privctl.c index 0baa6cfe8..9c14aa5c8 100644 --- a/lib/syslib/sys_privctl.c +++ b/lib/syslib/sys_privctl.c @@ -4,7 +4,7 @@ int sys_privctl(int proc, int request, int i, void *p) { message m; - m.CTL_PROC_NR = proc; + m.CTL_ENDPT = proc; m.CTL_REQUEST = request; m.CTL_MM_PRIV = i; m.CTL_ARG_PTR = p; diff --git a/lib/syslib/sys_sdevio.c b/lib/syslib/sys_sdevio.c index 5b9cb4d6b..481d74ae6 100644 --- a/lib/syslib/sys_sdevio.c +++ b/lib/syslib/sys_sdevio.c @@ -17,7 +17,7 @@ int count; /* number of elements */ m_io.DIO_REQUEST = req; m_io.DIO_TYPE = type; m_io.DIO_PORT = port; - m_io.DIO_VEC_PROC = proc_nr; + m_io.DIO_VEC_ENDPT = proc_nr; m_io.DIO_VEC_ADDR = buffer; m_io.DIO_VEC_SIZE = count; diff --git a/lib/syslib/sys_sigreturn.c b/lib/syslib/sys_sigreturn.c index 445c45198..900682e87 100755 --- a/lib/syslib/sys_sigreturn.c +++ b/lib/syslib/sys_sigreturn.c @@ -10,7 +10,7 @@ struct sigmsg *sig_ctxt; /* POSIX style handling */ message m; int result; - m.SIG_PROC = proc_nr; + m.SIG_ENDPT = proc_nr; m.SIG_CTXT_PTR = (char *) sig_ctxt; result = _taskcall(SYSTASK, SYS_SIGRETURN, &m); return(result); diff --git a/lib/syslib/sys_sigsend.c b/lib/syslib/sys_sigsend.c index e879b549d..fcae8810f 100644 --- a/lib/syslib/sys_sigsend.c +++ b/lib/syslib/sys_sigsend.c @@ -10,7 +10,7 @@ struct sigmsg *sig_ctxt; /* POSIX style handling */ message m; int result; - m.SIG_PROC = proc_nr; + m.SIG_ENDPT = proc_nr; m.SIG_CTXT_PTR = (char *) sig_ctxt; result = _taskcall(SYSTASK, SYS_SIGSEND, &m); return(result); diff --git a/lib/syslib/sys_svrctl.c b/lib/syslib/sys_svrctl.c index 16b1bc667..7fc8ad130 100644 --- a/lib/syslib/sys_svrctl.c +++ b/lib/syslib/sys_svrctl.c @@ -4,7 +4,7 @@ int sys_svrctl(int proc, int request, int priv, vir_bytes argp) { message m; - m.CTL_PROC_NR = proc; + m.CTL_ENDPT = proc; m.CTL_REQUEST = request; m.CTL_MM_PRIV = priv; m.CTL_ARG_PTR = (char *) argp; diff --git a/lib/syslib/sys_times.c b/lib/syslib/sys_times.c index b23da1806..5b5a7526a 100755 --- a/lib/syslib/sys_times.c +++ b/lib/syslib/sys_times.c @@ -8,7 +8,7 @@ clock_t ptr[5]; /* pointer to time buffer */ message m; int r; - m.T_PROC_NR = proc; + m.T_ENDPT = proc; r = _taskcall(SYSTASK, SYS_TIMES, &m); ptr[0] = m.T_USER_TIME; ptr[1] = m.T_SYSTEM_TIME; diff --git a/lib/syslib/sys_trace.c b/lib/syslib/sys_trace.c index 31a0851fb..e7b75c4d6 100755 --- a/lib/syslib/sys_trace.c +++ b/lib/syslib/sys_trace.c @@ -7,7 +7,7 @@ long addr, *data_p; message m; int r; - m.CTL_PROC_NR = proc_nr; + m.CTL_ENDPT = proc_nr; m.CTL_REQUEST = req; m.CTL_ADDRESS = addr; if (data_p) m.CTL_DATA = *data_p; diff --git a/lib/syslib/sys_umap.c b/lib/syslib/sys_umap.c index 71ee4324a..87f83aeab 100644 --- a/lib/syslib/sys_umap.c +++ b/lib/syslib/sys_umap.c @@ -13,7 +13,7 @@ phys_bytes *phys_addr; /* placeholder for result */ message m; int result; - m.CP_SRC_PROC_NR = proc_nr; + m.CP_SRC_ENDPT = proc_nr; m.CP_SRC_SPACE = seg; m.CP_SRC_ADDR = vir_addr; m.CP_NR_BYTES = bytes; diff --git a/lib/syslib/sys_vircopy.c b/lib/syslib/sys_vircopy.c index e5900ccb4..5c1e03ac2 100644 --- a/lib/syslib/sys_vircopy.c +++ b/lib/syslib/sys_vircopy.c @@ -18,10 +18,10 @@ phys_bytes bytes; /* how many bytes */ message copy_mess; if (bytes == 0L) return(OK); - copy_mess.CP_SRC_PROC_NR = src_proc; + copy_mess.CP_SRC_ENDPT = src_proc; copy_mess.CP_SRC_SPACE = src_seg; copy_mess.CP_SRC_ADDR = (long) src_vir; - copy_mess.CP_DST_PROC_NR = dst_proc; + copy_mess.CP_DST_ENDPT = dst_proc; copy_mess.CP_DST_SPACE = dst_seg; copy_mess.CP_DST_ADDR = (long) dst_vir; copy_mess.CP_NR_BYTES = (long) bytes; diff --git a/lib/sysutil/env_get_prm.c b/lib/sysutil/env_get_prm.c index 1d5a8710c..cad5aead0 100644 --- a/lib/sysutil/env_get_prm.c +++ b/lib/sysutil/env_get_prm.c @@ -53,7 +53,7 @@ int max_len; /* maximum length of value */ /* Get copy of boot monitor parameters. */ m.m_type = SYS_GETINFO; m.I_REQUEST = GET_MONPARAMS; - m.I_PROC_NR = SELF; + m.I_ENDPT = SELF; m.I_VAL_LEN = sizeof(mon_params); m.I_VAL_PTR = mon_params; if ((s=_taskcall(SYSTASK, SYS_GETINFO, &m)) != OK) { diff --git a/lib/sysutil/getuptime.c b/lib/sysutil/getuptime.c index c304b93d3..4dd76a1ca 100644 --- a/lib/sysutil/getuptime.c +++ b/lib/sysutil/getuptime.c @@ -10,7 +10,7 @@ clock_t *ticks; /* uptime in ticks */ int s; m.m_type = SYS_TIMES; /* request time information */ - m.T_PROC_NR = NONE; /* ignore process times */ + m.T_ENDPT = NONE; /* ignore process times */ s = _taskcall(SYSTASK, SYS_TIMES, &m); *ticks = m.T_BOOT_TICKS; return(s); diff --git a/lib/sysutil/kputc.c b/lib/sysutil/kputc.c index ca0e4457c..18aa3d03a 100644 --- a/lib/sysutil/kputc.c +++ b/lib/sysutil/kputc.c @@ -28,7 +28,7 @@ int c; /* Send the buffer to this output driver. */ m.DIAG_BUF_COUNT = buf_count; m.DIAG_PRINT_BUF = print_buf; - m.DIAG_PROC_NR = SELF; + m.DIAG_ENDPT = SELF; m.m_type = DIAGNOSTICS; (void) _sendrec(procs[p], &m); } diff --git a/lib/sysutil/tickdelay.c b/lib/sysutil/tickdelay.c index eb84099ef..fcf770711 100644 --- a/lib/sysutil/tickdelay.c +++ b/lib/sysutil/tickdelay.c @@ -19,7 +19,7 @@ long ticks; /* number of ticks to wait */ if (ticks <= 0) return; /* check for robustness */ - m.ALRM_PROC_NR = SELF; /* SELF means this process nr */ + m.ALRM_ENDPT = SELF; /* SELF means this process nr */ m.ALRM_EXP_TIME = ticks; /* request message after ticks */ m.ALRM_ABS_TIME = 0; /* ticks are relative to now */ s = _taskcall(SYSTASK, SYS_SETALARM, &m);