From 2d29c51167b50286e94bda35275e62cfc3c04dfd Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 13 Mar 2008 13:42:06 +0000 Subject: [PATCH] lwp-fixprotos-20080313 LICENSE IPL10 FIXES 89857 make everything match, and make *ep take void and not a pointer --- src/lwp/lwp.c | 24 ++++++++++++------------ src/lwp/lwp.h | 2 +- src/lwp/process.c | 9 +++------ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/lwp/lwp.c b/src/lwp/lwp.c index 1d703715f..8f669f62a 100644 --- a/src/lwp/lwp.c +++ b/src/lwp/lwp.c @@ -100,9 +100,9 @@ extern char PRE_Block; /* from preempt.c */ } while (0) #endif -static void *Dispatcher(void *); -static void *Create_Process_Part2(void *); -static void *Exit_LWP(void *); +static void Dispatcher(void); +static void Create_Process_Part2(void); +static void Exit_LWP(void); static afs_int32 Initialize_Stack(char *stackptr, int stacksize); static int Stack_Used(register char *stackptr, int stacksize); @@ -786,14 +786,14 @@ Abort_LWP(char *msg) Dump_Processes(); #endif if (LWPANCHOR.outersp == NULL) - Exit_LWP(NULL); + Exit_LWP(); else savecontext(Exit_LWP, &tempcontext, LWPANCHOR.outersp); return; } -static void * -Create_Process_Part2(void *unused) +static void +Create_Process_Part2(void) { /* creates a context for the new process */ PROCESS temp; @@ -802,7 +802,7 @@ Create_Process_Part2(void *unused) savecontext(Dispatcher, &temp->context, NULL); (*temp->ep) (temp->parm); LWP_DestroyProcess(temp); - return 0; + return; } static int @@ -881,8 +881,8 @@ purge_dead_pcbs(void) int LWP_TraceProcesses = 0; -static void * -Dispatcher(void *unused) +static void +Dispatcher(void) { /* Lightweight process dispatcher */ register int i; #ifdef DEBUG @@ -976,7 +976,7 @@ Dispatcher(void *unused) returnto(&lwp_cpptr->context); - return 0; /* not reachable */ + return; /* not reachable */ } /* Complain of a stack overflow to stderr without using stdio. */ @@ -1009,8 +1009,8 @@ Dispose_of_Dead_PCB(PROCESS cur) */ } -static void * -Exit_LWP(void *unused) +static void +Exit_LWP(void) { abort(); } diff --git a/src/lwp/lwp.h b/src/lwp/lwp.h index 1186fde7a..39663341e 100644 --- a/src/lwp/lwp.h +++ b/src/lwp/lwp.h @@ -386,7 +386,7 @@ extern int LWP_QWait(void); extern int LWP_QSignal(register PROCESS pid); #endif -extern afs_int32 savecontext(void *(*ep)(void *), +extern afs_int32 savecontext(void (*ep)(void), struct lwp_context *savearea, char *sp); extern void returnto(struct lwp_context *savearea); diff --git a/src/lwp/process.c b/src/lwp/process.c index 027c3abc3..357bd364d 100644 --- a/src/lwp/process.c +++ b/src/lwp/process.c @@ -31,7 +31,7 @@ extern char PRE_Block; /* used in lwp.c and process.s */ #if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) afs_int32 -savecontext(void (*ep) (void *dummy), struct lwp_context *savearea, char *newsp) +savecontext(void (*ep) (void), struct lwp_context *savearea, char *newsp) { #if defined(AFS_LINUX20_ENV) /* getcontext does not export stack info */ @@ -137,7 +137,7 @@ typedef int jmp_buf_type; #endif /*SGI*/ static jmp_buf jmp_tmp; -static char (*EP) (); +static void *(*EP) (void); static int rc; static jmp_buf_type *jmpBuffer; @@ -171,10 +171,7 @@ static int ptr_mangle(int p) afs_int32 -savecontext(ep, savearea, sp) - void (*ep) (); - struct lwp_context *savearea; - char *sp; +savecontext(void (*ep)(void), struct lwp_context *savearea, char *sp) { int code; -- 2.39.5