From: Michael Meffie Date: Mon, 29 Jun 2015 15:03:16 +0000 (-0400) Subject: viced: remove old signal handler wrappers X-Git-Tag: openafs-stable-1_8_0pre1~131 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=97d02926d3d82bf49ad0f53b85c186e0c6a96530 viced: remove old signal handler wrappers Remove remnants of old lwp thread signal handler wrapper functions from the fileserver. The lwp softsig handlers required a function which was passed a void pointer argument and returned a void pointer. Tidy the code by removing the unneeded wrappers and use the signal handler functions directly. Change-Id: I3d52efe659b03ee9a9484ec7a9d74404f1970278 Reviewed-on: https://gerrit.openafs.org/11921 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- diff --git a/src/viced/host.h b/src/viced/host.h index ff5c604..fead948 100644 --- a/src/viced/host.h +++ b/src/viced/host.h @@ -203,7 +203,6 @@ extern int MultiBreakCallBackAlternateAddress_r(struct host *host, struct AFSCBFids *afidp); extern int DumpCallBackState(void); extern int PrintCallBackStats(void); -extern void *ShutDown(void *); extern void ShutDownAndCore(int dopanic); extern int h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport, diff --git a/src/viced/viced.c b/src/viced/viced.c index 2092cb9..936cdaa 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -83,12 +83,10 @@ extern int etext; -void *ShutDown(void *); static void ClearXStatValues(void); static void PrintCounters(void); static void ResetCheckDescriptors(void); static void ResetCheckSignal(void); -static void *CheckSignal(void *); static afs_int32 Do_VLRegisterRPC(void); @@ -241,8 +239,8 @@ static int fs_stateInit(void) */ /* DEBUG HACK */ -static void * -CheckDescriptors(void *unused) +void +CheckDescriptors_Signal(int signo) { #ifndef AFS_NT40_ENV struct afs_stat status; @@ -260,26 +258,29 @@ CheckDescriptors(void *unused) fflush(stdout); ResetCheckDescriptors(); #endif - return 0; -} /*CheckDescriptors */ - +} void CheckSignal_Signal(int x) { - CheckSignal(NULL); + if (FS_registered > 0) { + /* + * We have proper ip addresses; tell the vlserver what we got; the following + * routine will do the proper reporting for us + */ + Do_VLRegisterRPC(); + } + h_DumpHosts(); + h_PrintClients(); + DumpCallBackState(); + PrintCounters(); + ResetCheckSignal(); } void ShutDown_Signal(int x) { - ShutDown(NULL); -} - -void -CheckDescriptors_Signal(int x) -{ - CheckDescriptors(NULL); + ShutDownAndCore(DONTPANIC); } /* check whether caller is authorized to perform admin operations */ @@ -686,26 +687,6 @@ PrintCounters(void) } /*PrintCounters */ - - -static void * -CheckSignal(void *unused) -{ - if (FS_registered > 0) { - /* - * We have proper ip addresses; tell the vlserver what we got; the following - * routine will do the proper reporting for us - */ - Do_VLRegisterRPC(); - } - h_DumpHosts(); - h_PrintClients(); - DumpCallBackState(); - PrintCounters(); - ResetCheckSignal(); - return 0; -} /*CheckSignal */ - static void * ShutdownWatchdogLWP(void *unused) { @@ -817,13 +798,6 @@ ShutDownAndCore(int dopanic) exit(0); } -void * -ShutDown(void *unused) -{ /* backward compatibility */ - ShutDownAndCore(DONTPANIC); - return 0; -} - static afs_int32 ParseRights(char *arights) {