From: Tomas Hruby Date: Tue, 22 Sep 2009 21:42:02 +0000 (+0000) Subject: endpoint_t in syslib X-Git-Tag: v3.1.5~105 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=b900311656476c1e03a790bb49084a56238fd1e8;p=minix.git endpoint_t in syslib - headers use the endpoint_t in syslib.h and the implmentation was using int instead. Both uses endpoint_t now - every variable named like proc, proc_nr or proc_nr_e of type endpoint_t has name proc_ep now - endpoint_t defined as u32_t not int --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c346b8764..183f3c2ca 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -313,7 +313,7 @@ u16_t *didp; *===========================================================================*/ PUBLIC int pci_reserve2(devind, proc) int devind; -int proc; +endpoint_t proc; { int i, r; int ilr; diff --git a/include/minix/syslib.h b/include/minix/syslib.h index d3f09667f..4c2a025f6 100755 --- a/include/minix/syslib.h +++ b/include/minix/syslib.h @@ -28,26 +28,26 @@ struct rs_pci; /*==========================================================================* * Minix system library. * *==========================================================================*/ -_PROTOTYPE( int _taskcall, (int who, int syscallnr, message *msgptr)); +_PROTOTYPE( int _taskcall, (endpoint_t who, int syscallnr, message *msgptr)); _PROTOTYPE( int sys_abort, (int how, ...)); -_PROTOTYPE( int sys_enable_iop, (endpoint_t proc)); -_PROTOTYPE( int sys_exec, (endpoint_t proc, char *ptr, +_PROTOTYPE( int sys_enable_iop, (endpoint_t proc_ep)); +_PROTOTYPE( int sys_exec, (endpoint_t proc_ep, char *ptr, char *aout, vir_bytes initpc)); _PROTOTYPE( int sys_fork, (endpoint_t parent, endpoint_t child, int *, struct mem_map *ptr, u32_t vm, vir_bytes *)); -_PROTOTYPE( int sys_newmap, (endpoint_t proc, struct mem_map *ptr)); -_PROTOTYPE( int sys_exit, (endpoint_t proc)); -_PROTOTYPE( int sys_trace, (int req, endpoint_t proc, long addr, long *data_p)); +_PROTOTYPE( int sys_newmap, (endpoint_t proc_ep, struct mem_map *ptr)); +_PROTOTYPE( int sys_exit, (endpoint_t proc_ep)); +_PROTOTYPE( int sys_trace, (int req, endpoint_t proc_ep, long addr, long *data_p)); -_PROTOTYPE( int sys_privctl, (endpoint_t proc, int req, void *p)); +_PROTOTYPE( int sys_privctl, (endpoint_t proc_ep, int req, int i, void *p)); _PROTOTYPE( int sys_setgrant, (cp_grant_t *grants, int ngrants)); -_PROTOTYPE( int sys_nice, (endpoint_t proc, int priority)); +_PROTOTYPE( int sys_nice, (endpoint_t proc_ep, int priority)); _PROTOTYPE( int sys_int86, (struct reg86u *reg86p)); _PROTOTYPE( int sys_vm_setbuf, (phys_bytes base, phys_bytes size, phys_bytes high)); -_PROTOTYPE( int sys_vm_map, (endpoint_t proc_nr, int do_map, +_PROTOTYPE( int sys_vm_map, (endpoint_t proc_ep, int do_map, phys_bytes base, phys_bytes size, phys_bytes offset)); _PROTOTYPE( int sys_vmctl, (endpoint_t who, int param, u32_t value)); _PROTOTYPE( int sys_vmctl_get_pagefault_i386, (endpoint_t *who, u32_t *cr2, u32_t *err)); @@ -62,14 +62,14 @@ _PROTOTYPE( int sys_sysctl, (int ctl, char *arg1, int arg2)); _PROTOTYPE( int sys_sysctl_stacktrace, (endpoint_t who)); /* Shorthands for sys_sdevio() system call. */ -#define sys_insb(port, proc_nr, buffer, count) \ - sys_sdevio(DIO_INPUT_BYTE, port, proc_nr, buffer, count, 0) -#define sys_insw(port, proc_nr, buffer, count) \ - sys_sdevio(DIO_INPUT_WORD, port, proc_nr, buffer, count, 0) -#define sys_outsb(port, proc_nr, buffer, count) \ - sys_sdevio(DIO_OUTPUT_BYTE, port, proc_nr, buffer, count, 0) -#define sys_outsw(port, proc_nr, buffer, count) \ - sys_sdevio(DIO_OUTPUT_WORD, port, proc_nr, buffer, count, 0) +#define sys_insb(port, proc_ep, buffer, count) \ + sys_sdevio(DIO_INPUT_BYTE, port, proc_ep, buffer, count, 0) +#define sys_insw(port, proc_ep, buffer, count) \ + sys_sdevio(DIO_INPUT_WORD, port, proc_ep, buffer, count, 0) +#define sys_outsb(port, proc_ep, buffer, count) \ + sys_sdevio(DIO_OUTPUT_BYTE, port, proc_ep, buffer, count, 0) +#define sys_outsw(port, proc_ep, buffer, count) \ + sys_sdevio(DIO_OUTPUT_WORD, port, proc_ep, buffer, count, 0) #define sys_safe_insb(port, ept, grant, offset, count) \ sys_sdevio(DIO_SAFE_INPUT_BYTE, port, ept, (void*)grant, count, offset) #define sys_safe_outsb(port, ept, grant, offset, count) \ @@ -78,7 +78,7 @@ _PROTOTYPE( int sys_sysctl_stacktrace, (endpoint_t who)); sys_sdevio(DIO_SAFE_INPUT_WORD, port, ept, (void*)grant, count, offset) #define sys_safe_outsw(port, ept, grant, offset, count) \ sys_sdevio(DIO_SAFE_OUTPUT_WORD, port, ept, (void*)grant, count, offset) -_PROTOTYPE( int sys_sdevio, (int req, long port, endpoint_t proc_nr, +_PROTOTYPE( int sys_sdevio, (int req, long port, endpoint_t proc_ep, void *buffer, int count, vir_bytes offset)); _PROTOTYPE(void *alloc_contig, (size_t len, int flags, phys_bytes *phys)); #define AC_ALIGN4K 0x01 @@ -89,7 +89,7 @@ _PROTOTYPE(void *alloc_contig, (size_t len, int flags, phys_bytes *phys)); /* Clock functionality: get system times, (un)schedule an alarm call, or * retrieve/set a process-virtual timer. */ -_PROTOTYPE( int sys_times, (endpoint_t proc_nr, clock_t *user_time, +_PROTOTYPE( int sys_times, (endpoint_t proc_ep, clock_t *user_time, clock_t *sys_time, clock_t *uptime)); _PROTOTYPE(int sys_setalarm, (clock_t exp_time, int abs_time)); _PROTOTYPE( int sys_vtimer, (endpoint_t proc_nr, int which, clock_t *newval, @@ -144,9 +144,9 @@ _PROTOTYPE(int sys_virvcopy, (phys_cp_req *vec_ptr,int vec_size,int *nr_ok)); _PROTOTYPE(int sys_physvcopy, (phys_cp_req *vec_ptr,int vec_size,int *nr_ok)); #endif -_PROTOTYPE(int sys_umap, (endpoint_t proc_nr, int seg, vir_bytes vir_addr, +_PROTOTYPE(int sys_umap, (endpoint_t proc_ep, int seg, vir_bytes vir_addr, vir_bytes bytes, phys_bytes *phys_addr)); -_PROTOTYPE(int sys_umap_data_fb, (endpoint_t proc_nr, vir_bytes vir_addr, +_PROTOTYPE(int sys_umap_data_fb, (endpoint_t proc_ep, vir_bytes vir_addr, vir_bytes bytes, phys_bytes *phys_addr)); _PROTOTYPE(int sys_segctl, (int *index, u16_t *seg, vir_bytes *off, phys_bytes phys, vir_bytes size)); @@ -173,11 +173,11 @@ _PROTOTYPE(int sys_getinfo, (int request, void *val_ptr, int val_len, _PROTOTYPE(int sys_whoami, (endpoint_t *ep, char *name, int namelen)); /* Signal control. */ -_PROTOTYPE(int sys_kill, (endpoint_t proc, int sig) ); -_PROTOTYPE(int sys_sigsend, (endpoint_t proc_nr, struct sigmsg *sig_ctxt) ); -_PROTOTYPE(int sys_sigreturn, (endpoint_t proc_nr, struct sigmsg *sig_ctxt) ); -_PROTOTYPE(int sys_getksig, (endpoint_t *k_proc_nr, sigset_t *k_sig_map) ); -_PROTOTYPE(int sys_endksig, (endpoint_t proc_nr) ); +_PROTOTYPE(int sys_kill, (endpoint_t proc_ep, int sig) ); +_PROTOTYPE(int sys_sigsend, (endpoint_t proc_ep, struct sigmsg *sig_ctxt) ); +_PROTOTYPE(int sys_sigreturn, (endpoint_t proc_ep, struct sigmsg *sig_ctxt) ); +_PROTOTYPE(int sys_getksig, (endpoint_t *proc_ep, sigset_t *k_sig_map) ); +_PROTOTYPE(int sys_endksig, (endpoint_t proc_ep) ); /* NOTE: two different approaches were used to distinguish the device I/O * types 'byte', 'word', 'long': the latter uses #define and results in a @@ -222,12 +222,12 @@ _PROTOTYPE( void pci_attr_w32, (int devind, int port, u32_t value) ); _PROTOTYPE( char *pci_dev_name, (U16_t vid, U16_t did) ); _PROTOTYPE( char *pci_slot_name, (int devind) ); _PROTOTYPE( int pci_set_acl, (struct rs_pci *rs_pci) ); -_PROTOTYPE( int pci_del_acl, (endpoint_t proc_nr) ); +_PROTOTYPE( int pci_del_acl, (endpoint_t proc_ep) ); /* Profiling. */ -_PROTOTYPE( int sys_sprof, (int action, int size, int freq, int endpt, - void *ctl_ptr, void *mem_ptr) ); -_PROTOTYPE( int sys_cprof, (int action, int size, int endpt, +_PROTOTYPE( int sys_sprof, (int action, int size, int freq, + endpoint_t endpt, void *ctl_ptr, void *mem_ptr) ); +_PROTOTYPE( int sys_cprof, (int action, int size, endpoint_t endpt, void *ctl_ptr, void *mem_ptr) ); _PROTOTYPE( int sys_profbuf, (void *ctl_ptr, void *mem_ptr) ); diff --git a/include/minix/type.h b/include/minix/type.h index b14a98f13..1dadb528b 100755 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -13,7 +13,7 @@ typedef unsigned int vir_clicks; /* virtual addr/length in clicks */ typedef unsigned long phys_bytes; /* physical addr/length in bytes */ typedef unsigned int phys_clicks; /* physical addr/length in clicks */ -typedef int endpoint_t; /* process identifier */ +typedef u32_t endpoint_t; /* process identifier */ #if (_MINIX_CHIP == _CHIP_INTEL) typedef long unsigned int vir_bytes; /* virtual addresses/lengths in bytes */ diff --git a/include/unistd.h b/include/unistd.h index 50c4cf3e4..be3fe47ca 100755 --- a/include/unistd.h +++ b/include/unistd.h @@ -183,7 +183,7 @@ _PROTOTYPE( int getdomainname, (char *_domain, size_t _len) ); _PROTOTYPE( int ttyslot, (void) ); _PROTOTYPE( int fttyslot, (int _fd) ); _PROTOTYPE( char *crypt, (const char *_key, const char *_salt) ); -_PROTOTYPE( int getsysinfo, (int who, int what, void *where) ); +_PROTOTYPE( int getsysinfo, (endpoint_t who, int what, void *where) ); _PROTOTYPE( int getsigset, (sigset_t *sigset) ); _PROTOTYPE( int getprocnr, (void) ); _PROTOTYPE( int getnprocnr, (pid_t pid) ); diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index b2ae9eaff..57d641b83 100755 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -256,6 +256,7 @@ PUBLIC void idt_init(void) idt_copy_vectors(gate_table); idt_copy_vectors(gate_table_pic); + idt_reload(); } diff --git a/lib/other/sys_eniop.c b/lib/other/sys_eniop.c index 5cda897b4..f270006ad 100644 --- a/lib/other/sys_eniop.c +++ b/lib/other/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) +endpoint_t proc_nr_e; /* number of process to allow I/O */ { message m_iop; - m_iop.IO_ENDPT = proc_nr; + m_iop.IO_ENDPT = proc_nr_e; return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop); } diff --git a/lib/other/taskcall.c b/lib/other/taskcall.c index 0a2024aa1..02ab258ca 100755 --- a/lib/other/taskcall.c +++ b/lib/other/taskcall.c @@ -7,7 +7,7 @@ #include PUBLIC int _taskcall(who, syscallnr, msgptr) -int who; +endpoint_t who; int syscallnr; register message *msgptr; { diff --git a/lib/syslib/pci_del_acl.c b/lib/syslib/pci_del_acl.c index 3ab86db58..b50d355f0 100644 --- a/lib/syslib/pci_del_acl.c +++ b/lib/syslib/pci_del_acl.c @@ -12,8 +12,8 @@ pci_del_acl.c /*===========================================================================* * pci_del_acl * *===========================================================================*/ -PUBLIC int pci_del_acl(proc_nr) -endpoint_t proc_nr; +PUBLIC int pci_del_acl(proc_ep) +endpoint_t proc_ep; { int r; message m; @@ -33,7 +33,7 @@ endpoint_t proc_nr; m.m_type= BUSC_PCI_DEL_ACL; - m.m1_i1= proc_nr; + m.m1_i1= proc_ep; r= sendrec(pci_procnr, &m); if (r != 0) diff --git a/lib/syslib/sys_cprof.c b/lib/syslib/sys_cprof.c index 4abfad8a3..2b981df99 100644 --- a/lib/syslib/sys_cprof.c +++ b/lib/syslib/sys_cprof.c @@ -6,7 +6,7 @@ PUBLIC int sys_cprof(action, size, endpt, ctl_ptr, mem_ptr) int action; /* get/reset profiling tables */ int size; /* size of allocated memory */ -int endpt; /* caller endpoint */ +endpoint_t endpt; /* caller endpoint */ void *ctl_ptr; /* location of info struct */ void *mem_ptr; /* location of allocated memory */ { diff --git a/lib/syslib/sys_endsig.c b/lib/syslib/sys_endsig.c index 8385b4d86..8776256b0 100755 --- a/lib/syslib/sys_endsig.c +++ b/lib/syslib/sys_endsig.c @@ -3,13 +3,13 @@ /*===========================================================================* * sys_endksig * *===========================================================================*/ -PUBLIC int sys_endksig(proc_nr) -int proc_nr; /* process number */ +PUBLIC int sys_endksig(proc_ep) +endpoint_t proc_ep; /* process number */ { message m; int result; - m.SIG_ENDPT = proc_nr; + m.SIG_ENDPT = proc_ep; result = _taskcall(SYSTASK, SYS_ENDKSIG, &m); return(result); } diff --git a/lib/syslib/sys_eniop.c b/lib/syslib/sys_eniop.c index 2a8f4f04a..bee8965fc 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_e) -int proc_nr_e; /* number of process to allow I/O */ +PUBLIC int sys_enable_iop(proc_ep) +endpoint_t proc_ep; /* number of process to allow I/O */ { message m_iop; - m_iop.IO_ENDPT = proc_nr_e; + m_iop.IO_ENDPT = proc_ep; return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop); } diff --git a/lib/syslib/sys_exec.c b/lib/syslib/sys_exec.c index 836b27274..ddcfe2780 100755 --- a/lib/syslib/sys_exec.c +++ b/lib/syslib/sys_exec.c @@ -1,7 +1,7 @@ #include "syslib.h" -PUBLIC int sys_exec(proc, ptr, prog_name, initpc) -int proc; /* process that did exec */ +PUBLIC int sys_exec(proc_ep, ptr, prog_name, initpc) +endpoint_t proc_ep; /* process that did exec */ char *ptr; /* new stack pointer */ char *prog_name; /* name of the new program */ vir_bytes initpc; @@ -10,7 +10,7 @@ vir_bytes initpc; message m; - m.PR_ENDPT = proc; + m.PR_ENDPT = proc_ep; 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 ff8b04fa6..1351c4d5e 100644 --- a/lib/syslib/sys_exit.c +++ b/lib/syslib/sys_exit.c @@ -3,8 +3,8 @@ /*===========================================================================* * sys_exit * *===========================================================================*/ -PUBLIC int sys_exit(proc) -int proc; /* which process has exited */ +PUBLIC int sys_exit(proc_ep) +endpoint_t proc_ep; /* which process has exited */ { /* A process has exited. PM tells the kernel. In addition this call can be * used by system processes to directly exit without passing through the @@ -12,6 +12,6 @@ int proc; /* which process has exited */ */ message m; - m.PR_ENDPT = proc; + m.PR_ENDPT = proc_ep; return(_taskcall(SYSTASK, SYS_EXIT, &m)); } diff --git a/lib/syslib/sys_getsig.c b/lib/syslib/sys_getsig.c index 828e118e4..c49d5ac1b 100644 --- a/lib/syslib/sys_getsig.c +++ b/lib/syslib/sys_getsig.c @@ -3,15 +3,15 @@ /*===========================================================================* * sys_getksig * *===========================================================================*/ -PUBLIC int sys_getksig(k_proc_nr, k_sig_map) -int *k_proc_nr; /* return process number here */ +PUBLIC int sys_getksig(proc_ep, k_sig_map) +endpoint_t *proc_ep; /* return process number here */ sigset_t *k_sig_map; /* return signal map here */ { message m; int result; result = _taskcall(SYSTASK, SYS_GETKSIG, &m); - *k_proc_nr = m.SIG_ENDPT; + *proc_ep = 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 31366498c..a7e6381c1 100755 --- a/lib/syslib/sys_kill.c +++ b/lib/syslib/sys_kill.c @@ -1,13 +1,13 @@ #include "syslib.h" -PUBLIC int sys_kill(proc, signr) -int proc; /* which proc has exited */ +PUBLIC int sys_kill(proc_ep, signr) +endpoint_t proc_ep; /* which proc_ep has exited */ int signr; /* signal number: 1 - 16 */ { -/* A proc has to be signaled via MM. Tell the kernel. */ +/* A proc_ep has to be signaled via MM. Tell the kernel. */ message m; - m.SIG_ENDPT = proc; + m.SIG_ENDPT = proc_ep; 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 8a4dce006..176319ac7 100755 --- a/lib/syslib/sys_newmap.c +++ b/lib/syslib/sys_newmap.c @@ -1,14 +1,14 @@ #include "syslib.h" -PUBLIC int sys_newmap(proc, ptr) -int proc; /* process whose map is to be changed */ +PUBLIC int sys_newmap(proc_ep, ptr) +endpoint_t proc_ep; /* process whose map is to be changed */ struct mem_map *ptr; /* pointer to new map */ { /* A process has been assigned a new memory map. Tell the kernel. */ message m; - m.PR_ENDPT = proc; + m.PR_ENDPT = proc_ep; m.PR_MEM_PTR = (char *) ptr; return(_taskcall(SYSTASK, SYS_NEWMAP, &m)); } diff --git a/lib/syslib/sys_nice.c b/lib/syslib/sys_nice.c index 5e5bbe77f..97f1c4c3f 100755 --- a/lib/syslib/sys_nice.c +++ b/lib/syslib/sys_nice.c @@ -3,11 +3,11 @@ /*===========================================================================* * sys_nice * *===========================================================================*/ -PUBLIC int sys_nice(int proc, int prio) +PUBLIC int sys_nice(endpoint_t proc_ep, int prio) { message m; - m.PR_ENDPT = proc; + m.PR_ENDPT = proc_ep; m.PR_PRIORITY = prio; return(_taskcall(SYSTASK, SYS_NICE, &m)); } diff --git a/lib/syslib/sys_physcopy.c b/lib/syslib/sys_physcopy.c index c50aeaad3..c78ef6b24 100644 --- a/lib/syslib/sys_physcopy.c +++ b/lib/syslib/sys_physcopy.c @@ -2,10 +2,10 @@ PUBLIC int sys_physcopy(src_proc, src_seg, src_vir, dst_proc, dst_seg, dst_vir, bytes) -int src_proc; /* source process */ +endpoint_t src_proc; /* source process */ int src_seg; /* source memory segment */ vir_bytes src_vir; /* source virtual address */ -int dst_proc; /* destination process */ +endpoint_t dst_proc; /* destination process */ int dst_seg; /* destination memory segment */ vir_bytes dst_vir; /* destination virtual address */ phys_bytes bytes; /* how many bytes */ diff --git a/lib/syslib/sys_privctl.c b/lib/syslib/sys_privctl.c index 71a1bee1c..b3a61588a 100644 --- a/lib/syslib/sys_privctl.c +++ b/lib/syslib/sys_privctl.c @@ -1,10 +1,10 @@ #include "syslib.h" -int sys_privctl(endpoint_t proc, int request, void *p) +int sys_privctl(endpoint_t proc_ep, int request, int i, void *p) { message m; - m.CTL_ENDPT = proc; + m.CTL_ENDPT = proc_ep; m.CTL_REQUEST = request; m.CTL_ARG_PTR = p; diff --git a/lib/syslib/sys_sigreturn.c b/lib/syslib/sys_sigreturn.c index 900682e87..3d6ebdd6b 100755 --- a/lib/syslib/sys_sigreturn.c +++ b/lib/syslib/sys_sigreturn.c @@ -3,14 +3,14 @@ /*===========================================================================* * sys_sigreturn * *===========================================================================*/ -PUBLIC int sys_sigreturn(proc_nr, sig_ctxt) -int proc_nr; /* for which process */ +PUBLIC int sys_sigreturn(proc_ep, sig_ctxt) +endpoint_t proc_ep; /* for which process */ struct sigmsg *sig_ctxt; /* POSIX style handling */ { message m; int result; - m.SIG_ENDPT = proc_nr; + m.SIG_ENDPT = proc_ep; 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 fcae8810f..94faaeb60 100644 --- a/lib/syslib/sys_sigsend.c +++ b/lib/syslib/sys_sigsend.c @@ -3,14 +3,14 @@ /*===========================================================================* * sys_sigsend * *===========================================================================*/ -PUBLIC int sys_sigsend(proc_nr, sig_ctxt) -int proc_nr; /* for which process */ +PUBLIC int sys_sigsend(proc_ep, sig_ctxt) +endpoint_t proc_ep; /* for which process */ struct sigmsg *sig_ctxt; /* POSIX style handling */ { message m; int result; - m.SIG_ENDPT = proc_nr; + m.SIG_ENDPT = proc_ep; m.SIG_CTXT_PTR = (char *) sig_ctxt; result = _taskcall(SYSTASK, SYS_SIGSEND, &m); return(result); diff --git a/lib/syslib/sys_sprof.c b/lib/syslib/sys_sprof.c index 1553e8985..6e2fe423b 100644 --- a/lib/syslib/sys_sprof.c +++ b/lib/syslib/sys_sprof.c @@ -9,7 +9,7 @@ PUBLIC int sys_sprof(action, size, freq, endpt, ctl_ptr, mem_ptr) int action; /* start/stop profiling */ int size; /* available profiling memory */ int freq; /* sample frequency */ -int endpt; /* caller endpoint */ +endpoint_t endpt; /* caller endpoint */ void *ctl_ptr; /* location of info struct */ void *mem_ptr; /* location of profiling memory */ { diff --git a/lib/syslib/sys_times.c b/lib/syslib/sys_times.c index cd36f58c1..5615c0170 100755 --- a/lib/syslib/sys_times.c +++ b/lib/syslib/sys_times.c @@ -1,18 +1,18 @@ #include "syslib.h" -PUBLIC int sys_times(proc, user_time, sys_time, uptime) -int proc; /* proc whose times are needed */ +PUBLIC int sys_times(proc_ep, user_time, sys_time, uptime) +endpoint_t proc_ep; /* proc_ep whose times are needed */ clock_t *user_time; /* time spend in the process itself */ clock_t *sys_time; /* time spend in system on behalf of the * process */ clock_t *uptime; /* time the system is running */ { -/* Fetch the accounting info for a proc. */ +/* Fetch the accounting info for a proc_ep. */ message m; int r; - m.T_ENDPT = proc; + m.T_ENDPT = proc_ep; r = _taskcall(SYSTASK, SYS_TIMES, &m); if (user_time) *user_time = m.T_USER_TIME; if (sys_time) *sys_time = m.T_SYSTEM_TIME; diff --git a/lib/syslib/sys_trace.c b/lib/syslib/sys_trace.c index e7b75c4d6..471c435c8 100755 --- a/lib/syslib/sys_trace.c +++ b/lib/syslib/sys_trace.c @@ -1,13 +1,14 @@ #include "syslib.h" -PUBLIC int sys_trace(req, proc_nr, addr, data_p) -int req, proc_nr; +PUBLIC int sys_trace(req, proc_ep, addr, data_p) +int req; +endpoint_t proc_ep; long addr, *data_p; { message m; int r; - m.CTL_ENDPT = proc_nr; + m.CTL_ENDPT = proc_ep; 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 87f83aeab..6c5909a6f 100644 --- a/lib/syslib/sys_umap.c +++ b/lib/syslib/sys_umap.c @@ -3,8 +3,8 @@ /*===========================================================================* * sys_umap * *===========================================================================*/ -PUBLIC int sys_umap(proc_nr, seg, vir_addr, bytes, phys_addr) -int proc_nr; /* process number to do umap for */ +PUBLIC int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr) +endpoint_t proc_ep; /* process number to do umap for */ int seg; /* T, D, or S segment */ vir_bytes vir_addr; /* address in bytes with segment*/ vir_bytes bytes; /* number of bytes to be copied */ @@ -13,7 +13,7 @@ phys_bytes *phys_addr; /* placeholder for result */ message m; int result; - m.CP_SRC_ENDPT = proc_nr; + m.CP_SRC_ENDPT = proc_ep; 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 5c1e03ac2..65af1be3b 100644 --- a/lib/syslib/sys_vircopy.c +++ b/lib/syslib/sys_vircopy.c @@ -2,10 +2,10 @@ PUBLIC int sys_vircopy(src_proc, src_seg, src_vir, dst_proc, dst_seg, dst_vir, bytes) -int src_proc; /* source process */ +endpoint_t src_proc; /* source process */ int src_seg; /* source memory segment */ vir_bytes src_vir; /* source virtual address */ -int dst_proc; /* destination process */ +endpoint_t dst_proc; /* destination process */ int dst_seg; /* destination memory segment */ vir_bytes dst_vir; /* destination virtual address */ phys_bytes bytes; /* how many bytes */ diff --git a/lib/syslib/taskcall.c b/lib/syslib/taskcall.c index 0a2024aa1..02ab258ca 100755 --- a/lib/syslib/taskcall.c +++ b/lib/syslib/taskcall.c @@ -7,7 +7,7 @@ #include PUBLIC int _taskcall(who, syscallnr, msgptr) -int who; +endpoint_t who; int syscallnr; register message *msgptr; { diff --git a/lib/sysutil/taskcall.c b/lib/sysutil/taskcall.c index 0a2024aa1..02ab258ca 100644 --- a/lib/sysutil/taskcall.c +++ b/lib/sysutil/taskcall.c @@ -7,7 +7,7 @@ #include PUBLIC int _taskcall(who, syscallnr, msgptr) -int who; +endpoint_t who; int syscallnr; register message *msgptr; {