From: Kees van Reeuwijk Date: Tue, 25 May 2010 07:23:24 +0000 (+0000) Subject: Fixed some inconsistent strict typing declarations. X-Git-Tag: v3.1.7~38 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=ac14a989b3bbaaaa700da7e24c839b787903eda0;p=minix.git Fixed some inconsistent strict typing declarations. Better strict typing. --- diff --git a/kernel/arch/i386/apic.h b/kernel/arch/i386/apic.h index 82bffa97c..3a3f5fef6 100644 --- a/kernel/arch/i386/apic.h +++ b/kernel/arch/i386/apic.h @@ -93,7 +93,7 @@ #include "kernel/kernel.h" EXTERN vir_bytes lapic_addr; -EXTERN u32_t lapic_eoi_addr; +EXTERN vir_bytes lapic_eoi_addr; #define MAX_NR_IOAPICS 32 #define MAX_NR_BUSES 32 diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index a746b1e5d..c638e1e16 100644 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -320,7 +320,7 @@ for (rp = BEG_PROC_ADDR; rp < END_PROC_ADDR; ++rp) { CHECK(rp->p_reg.gs, ds); CHECK(rp->p_reg.fs, ds); CHECK(rp->p_reg.ss, ds); - if(rp->p_endpoint != -2) { + if(rp->p_endpoint != SYSTEM) { CHECK(rp->p_reg.es, ds); } CHECK(rp->p_reg.ds, ds); diff --git a/kernel/proc.c b/kernel/proc.c index 0a1420d34..3d84cfb5f 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -461,6 +461,7 @@ proc_nr_t src_dst; /* src or dst process */ processes[0] = cp; #endif + /* FIXME: this compares a proc_nr_t with a endpoint_t */ while (src_dst != ANY) { /* check while process nr */ endpoint_t dep; xp = proc_addr(src_dst); /* follow chain of processes */ @@ -476,6 +477,7 @@ proc_nr_t src_dst; /* src or dst process */ return 0; if(dep == ANY) + /* FIXME: this assigns a proc_nr_t to a endpoint_t */ src_dst = ANY; else okendpt(dep, &src_dst); diff --git a/kernel/proc.h b/kernel/proc.h index 915277f91..2525a924d 100644 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -260,7 +260,7 @@ EXTERN struct proc proc[NR_TASKS + NR_PROCS]; /* process table */ EXTERN struct proc *rdy_head[NR_SCHED_QUEUES]; /* ptrs to ready list headers */ EXTERN struct proc *rdy_tail[NR_SCHED_QUEUES]; /* ptrs to ready list tails */ -_PROTOTYPE( int mini_send, (struct proc *caller_ptr, int dst_e, +_PROTOTYPE( int mini_send, (struct proc *caller_ptr, endpoint_t dst_e, message *m_ptr, int flags)); #endif /* __ASSEMBLY__ */ diff --git a/kernel/system/do_privctl.c b/kernel/system/do_privctl.c index ce4ca6c8d..c80ec9e6d 100644 --- a/kernel/system/do_privctl.c +++ b/kernel/system/do_privctl.c @@ -24,8 +24,8 @@ PUBLIC int do_privctl(struct proc * caller, message * m_ptr) * yet a system process, make sure it gets its own privilege structure. */ struct proc *rp; - int proc_nr; - int priv_id; + proc_nr_t proc_nr; + sys_id_t priv_id; int ipc_to_m, kcalls; int i, r; struct io_range io_range; diff --git a/servers/iso9660fs/device.c b/servers/iso9660fs/device.c index 6073a7503..057970fbb 100644 --- a/servers/iso9660fs/device.c +++ b/servers/iso9660fs/device.c @@ -11,7 +11,7 @@ FORWARD _PROTOTYPE( void safe_io_cleanup, (cp_grant_id_t, cp_grant_id_t *, int)); FORWARD _PROTOTYPE( int gen_opcl, (endpoint_t driver_e, int op, dev_t dev, int proc_e, int flags)); -FORWARD _PROTOTYPE( int gen_io, (int task_nr, message *mess_ptr)); +FORWARD _PROTOTYPE( int gen_io, (endpoint_t task_nr, message *mess_ptr)); /*===========================================================================* diff --git a/servers/mfs/proto.h b/servers/mfs/proto.h index 529cb56e9..10fccd7d9 100644 --- a/servers/mfs/proto.h +++ b/servers/mfs/proto.h @@ -32,7 +32,7 @@ _PROTOTYPE( int fs_new_driver, (void) ); _PROTOTYPE( struct inode *alloc_inode, (dev_t dev, mode_t bits) ); _PROTOTYPE( void dup_inode, (struct inode *ip) ); _PROTOTYPE( struct inode *find_inode, (dev_t dev, int numb) ); -_PROTOTYPE( void free_inode, (dev_t dev, Ino_t numb) ); +_PROTOTYPE( void free_inode, (dev_t dev, ino_t numb) ); _PROTOTYPE( int fs_getnode, (void) ); _PROTOTYPE( int fs_putnode, (void) ); _PROTOTYPE( void init_inode_cache, (void) ); diff --git a/servers/pm/signal.c b/servers/pm/signal.c index ac2b092f1..933f01518 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -213,7 +213,7 @@ PUBLIC int do_srv_kill() /*===========================================================================* * process_ksig * *===========================================================================*/ -PUBLIC int process_ksig(int proc_nr_e, int signo) +PUBLIC int process_ksig(endpoint_t proc_nr_e, int signo) { register struct mproc *rmp; int proc_nr; diff --git a/servers/rs/utility.c b/servers/rs/utility.c index a9e3e1c39..8deff09de 100644 --- a/servers/rs/utility.c +++ b/servers/rs/utility.c @@ -163,7 +163,7 @@ int code; /* status code */ /*===========================================================================* * rs_isokendpt * *===========================================================================*/ -PUBLIC int rs_isokendpt(int endpoint, int *proc) +PUBLIC int rs_isokendpt(endpoint_t endpoint, int *proc) { *proc = _ENDPOINT_P(endpoint); if(*proc < -NR_TASKS || *proc >= NR_PROCS)