DEVEL15-lwp-fixprotos-20080313
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Thu, 13 Mar 2008 13:42:19 +0000 (13:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 13 Mar 2008 13:42:19 +0000 (13:42 +0000)
LICENSE IPL10
FIXES 89857

make everything match, and make *ep take void and not a pointer

(cherry picked from commit 2d29c51167b50286e94bda35275e62cfc3c04dfd)

src/lwp/lwp.c
src/lwp/lwp.h
src/lwp/process.c

index 1d70371..8f669f6 100644 (file)
@@ -100,9 +100,9 @@ extern char PRE_Block;              /* from preempt.c */
 } while (0)
 #endif
 \f
-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();
 }
index 1186fde..3966334 100644 (file)
@@ -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);
 
index 027c3ab..357bd36 100644 (file)
@@ -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;