From b89c6634f556a15dffa764656d9503d224951cd8 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 20 Jun 2006 09:57:00 +0000 Subject: [PATCH] Use endpoint_t. New prototypes for related to grants and safecopy functions. --- kernel/glo.h | 4 +++- kernel/proc.c | 3 ++- kernel/proto.h | 16 +++++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/kernel/glo.h b/kernel/glo.h index 2b6f270a0..7de20763a 100755 --- a/kernel/glo.h +++ b/kernel/glo.h @@ -46,7 +46,9 @@ EXTERN int irq_use; /* map of all in-use irq's */ EXTERN reg_t mon_ss, mon_sp; /* boot monitor stack */ EXTERN int mon_return; /* true if we can return to monitor */ EXTERN int do_serial_debug; -EXTERN int who_e, who_p; /* message source endpoint and proc */ +EXTERN endpoint_t who_e; /* message source endpoint */ +EXTERN int who_p; /* message source proc */ +EXTERN int sys_call_code; /* kernel call number in SYSTEM */ /* VM */ EXTERN phys_bytes vm_base; diff --git a/kernel/proc.c b/kernel/proc.c index 6f92ad8b5..a07159f84 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -749,7 +749,8 @@ int line; #else PUBLIC int isokendpt_f(e, p, fatalflag) #endif -int e, *p, fatalflag; +endpoint_t e; +int *p, fatalflag; { int ok = 0; /* Convert an endpoint number into a process number. diff --git a/kernel/proto.h b/kernel/proto.h index ab031d450..bfaa88e3d 100755 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -3,6 +3,8 @@ #ifndef PROTO_H #define PROTO_H +#include + /* Struct declarations. */ struct proc; struct timer; @@ -32,10 +34,10 @@ _PROTOTYPE( void lock_enqueue, (struct proc *rp) ); _PROTOTYPE( void lock_dequeue, (struct proc *rp) ); _PROTOTYPE( void balance_queues, (struct timer *tp) ); #if DEBUG_ENABLE_IPC_WARNINGS -_PROTOTYPE( int isokendpt_f, (char *file, int line, int e, int *p, int f)); +_PROTOTYPE( int isokendpt_f, (char *file, int line, endpoint_t e, int *p, int f)); #define isokendpt_d(e, p, f) isokendpt_f(__FILE__, __LINE__, (e), (p), (f)) #else -_PROTOTYPE( int isokendpt_f, (int e, int *p, int f) ); +_PROTOTYPE( int isokendpt_f, (endpoint_t e, int *p, int f) ); #define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f)) #endif @@ -50,7 +52,7 @@ _PROTOTYPE( void cause_sig, (int proc_nr, int sig_nr) ); _PROTOTYPE( void sys_task, (void) ); _PROTOTYPE( void get_randomness, (int source) ); _PROTOTYPE( int virtual_copy, (struct vir_addr *src, struct vir_addr *dst, - vir_bytes bytes) ); + vir_bytes bytes) ); #define numap_local(proc_nr, vir_addr, bytes) \ umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes)) _PROTOTYPE( phys_bytes umap_local, (struct proc *rp, int seg, @@ -59,6 +61,10 @@ _PROTOTYPE( phys_bytes umap_remote, (struct proc *rp, int seg, vir_bytes vir_addr, vir_bytes bytes) ); _PROTOTYPE( phys_bytes umap_bios, (struct proc *rp, vir_bytes vir_addr, vir_bytes bytes) ); +_PROTOTYPE( phys_bytes umap_grant, (struct proc *, cp_grant_id_t, + vir_bytes)); +_PROTOTYPE( phys_bytes umap_verify_grant, (struct proc *, endpoint_t, + cp_grant_id_t, vir_bytes, vir_bytes, int)); _PROTOTYPE( void clear_endpoint, (struct proc *rc) ); /* system/do_newmap.c */ @@ -161,6 +167,10 @@ _PROTOTYPE( void alloc_segments, (struct proc *rp) ); /* system/do_vm.c */ _PROTOTYPE( void vm_map_default, (struct proc *pp) ); +/* system/do_safecopy.c */ +_PROTOTYPE( int verify_grant, (endpoint_t, endpoint_t, cp_grant_id_t, vir_bytes, + int, vir_bytes, vir_bytes *, endpoint_t *)); + #endif /* (CHIP == INTEL) */ #if (CHIP == M68000) -- 2.44.0