diff --git a/Makefile.in b/Makefile.in index 89466eadaa..a984449f92 100644 --- a/Makefile.in +++ b/Makefile.in @@ -121,7 +121,7 @@ config: prelude procmgmt: config ${COMPILE_PART1} procmgmt ${COMPILE_PART2} -util: procmgmt des +util: procmgmt des lwp_depinstall ${COMPILE_PART1} util ${COMPILE_PART2} audit: util rx rxkad diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c index 439fb7c461..9292c8270a 100644 --- a/src/afs/afs_callback.c +++ b/src/afs/afs_callback.c @@ -1009,7 +1009,7 @@ afs_RXCallBackServer(void) /* * Donate this process to Rx. */ - rx_ServerProc(); + rx_ServerProc(NULL); return (0); } /*afs_RXCallBackServer */ diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index da8f4d1c1a..fed0c76b2b 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -491,8 +491,8 @@ DeleteProc(register struct bnode_proc *abproc) } /* bnode lwp executes this code repeatedly */ -static int -bproc() +static void * +bproc(void *unused) { register afs_int32 code; register struct bnode *tb; @@ -641,6 +641,7 @@ bproc() } } } + return NULL; } static afs_int32 @@ -763,9 +764,11 @@ hdl_notifier(struct bnode_proc *tp) /* Called by IOMGR at low priority on IOMGR's stack shortly after a SIGCHLD * occurs. Wakes up bproc do redo things */ -int -bnode_SoftInt(int asignal) +void * +bnode_SoftInt(void *param) { + /* int asignal = (int) param; */ + IOMGR_Cancel(bproc_pid); return 0; } @@ -776,12 +779,10 @@ bnode_SoftInt(int asignal) void bnode_Int(int asignal) { - extern void bozo_ShutdownAndExit(); - if (asignal == SIGQUIT) { - IOMGR_SoftSig(bozo_ShutdownAndExit, (char *)asignal); + IOMGR_SoftSig(bozo_ShutdownAndExit, (void *) asignal); } else { - IOMGR_SoftSig(bnode_SoftInt, (char *)asignal); + IOMGR_SoftSig(bnode_SoftInt, (void *) asignal); } } diff --git a/src/bozo/bosoprocs.c b/src/bozo/bosoprocs.c index 98eaa78ba4..c1466da2b6 100644 --- a/src/bozo/bosoprocs.c +++ b/src/bozo/bosoprocs.c @@ -1655,9 +1655,10 @@ SBOZO_SetRestrictedMode(acall, arestmode) } #endif -void -bozo_ShutdownAndExit(int asignal) +void * +bozo_ShutdownAndExit(void *param) { + int asignal = (int) param; int code; bozo_Log diff --git a/src/bozo/bosprototypes.h b/src/bozo/bosprototypes.h index 590bedd685..7275737f88 100644 --- a/src/bozo/bosprototypes.h +++ b/src/bozo/bosprototypes.h @@ -13,4 +13,7 @@ /* bosserver.c */ void bozo_Log(char *format, ... ); +/* bosoprocs.c */ +void *bozo_ShutdownAndExit(void *arock /* really int asignal */); + #endif diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 76acbf06dc..0af208a677 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -514,8 +514,8 @@ bdrestart(register struct bnode *abnode, char *arock) #define BOZO_MINSKIP 3600 /* minimum to advance clock */ /* lwp to handle system restarts */ -static int -BozoDaemon() +static void * +BozoDaemon(void *unused) { register afs_int32 now; @@ -550,6 +550,7 @@ BozoDaemon() bnode_ApplyInstance(bdrestart, 0); } } + return NULL; } #ifdef AFS_AIX32_ENV diff --git a/src/bucoord/bc_status.c b/src/bucoord/bc_status.c index 56e4a7ad90..63fa19c763 100644 --- a/src/bucoord/bc_status.c +++ b/src/bucoord/bc_status.c @@ -104,8 +104,8 @@ nextItem(linkPtr) char *cmdLine; -int -cmdDispatch() +void * +cmdDispatch(void *unused) { #define MAXV 100 char **targv[MAXV]; /*Ptr to parsed argv stuff */ @@ -119,7 +119,7 @@ cmdDispatch() code = cmd_ParseLine(internalCmdLine, targv, &targc, MAXV); if (code) { printf("Couldn't parse line: '%s'", afs_error_message(code)); - return (1); + return (void *)(1); } free(internalCmdLine); @@ -129,10 +129,11 @@ cmdDispatch() */ doDispatch(targc, targv, 1); cmd_FreeArgv(targv); - return(0); + return(void *)(0); } -statusWatcher() +void * +statusWatcher(void *unused) { struct rx_connection *tconn = (struct rc_connection *)0; statusP curPollPtr = 0; @@ -394,6 +395,7 @@ statusWatcher() curPollPtr = 0; } /*done */ } /*w */ + return NULL; } /* bc_jobNumber diff --git a/src/bucoord/bucoord_prototypes.h b/src/bucoord/bucoord_prototypes.h new file mode 100644 index 0000000000..1807505b7f --- /dev/null +++ b/src/bucoord/bucoord_prototypes.h @@ -0,0 +1,17 @@ +/* Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _BUCOORD_PROTOTYPES_H +#define _BUCOORD_PROTOTYPES_H + +/* bc_status.c */ + +extern void *statusWatcher(void *); + +#endif + diff --git a/src/bucoord/dump.c b/src/bucoord/dump.c index d6b46c8bc8..36fc6ac5d9 100644 --- a/src/bucoord/dump.c +++ b/src/bucoord/dump.c @@ -199,9 +199,10 @@ freeDumpTaskVolumeList(vdptr) * The other half of the dump/restore create process call. In bc_StartDmpRst, * we allocated a dumpTask entry. Here we do the task and then free the entry. */ -bc_DmpRstStart(aindex) - afs_int32 aindex; +void * +bc_DmpRstStart(void *param) { + afs_int32 aindex = (afs_int32) param; register struct bc_dumpTask *tdump; register afs_int32 code; diff --git a/src/bucoord/main.c b/src/bucoord/main.c index 2136fe76d7..20fbe5dfa1 100644 --- a/src/bucoord/main.c +++ b/src/bucoord/main.c @@ -45,7 +45,7 @@ RCSID #include #include "bc.h" /*Backup Coordinator structs and defs */ - +#include "bucoord_prototypes.h" int localauth, interact; char tcell[64]; @@ -244,8 +244,6 @@ backupInit() PROCESS watcherPid; PROCESS pid; /* LWP process ID */ - extern statusWatcher(); - /* Initialization */ initialize_CMD_error_table(); diff --git a/src/budb/dbs_dump.c b/src/budb/dbs_dump.c index 9d189c2a71..d9efc99898 100644 --- a/src/budb/dbs_dump.c +++ b/src/budb/dbs_dump.c @@ -44,6 +44,7 @@ RCSID #include "globals.h" #include "afs/audit.h" +void *dumpWatcher(void *); /* dump ubik database - interface routines */ @@ -63,9 +64,10 @@ badEntry(dbAddr) * decode the arguments passed via LWP and dump the database. */ -setupDbDump(writeFid) - int writeFid; +void * +setupDbDump(void *param) { + int writeFid = (int)param; afs_int32 code = 0; code = InitRPC(&dumpSyncPtr->ut, LOCKREAD, 1); @@ -85,7 +87,7 @@ setupDbDump(writeFid) error_exit: if (dumpSyncPtr->ut) ubik_EndTrans(dumpSyncPtr->ut); - return (code); + return (void *)(code); } @@ -116,7 +118,6 @@ DumpDB(call, firstcall, maxLength, charListPtr, done) PROCESS dumperPid, watcherPid; int readSize; afs_int32 code = 0; - extern dumpWatcher(); if (callPermitted(call) == 0) ERROR(BUDB_NOTPERMITTED); @@ -288,7 +289,8 @@ RestoreDbHeader(call, header) * transactions can proceed. */ -dumpWatcher() +void * +dumpWatcher(void *unused) { afs_int32 code; diff --git a/src/budb/server.c b/src/budb/server.c index 4e123a7b06..4aae26983b 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -584,7 +584,7 @@ main(argc, argv) currentTime = time(0); LogError(0, "Ready to process requests at %s\n", ctime(¤tTime)); - rx_ServerProc(); /* donate this LWP */ + rx_ServerProc(NULL); /* donate this LWP */ error_exit: osi_audit(BUDB_FinishEvent, code, AUD_END); diff --git a/src/butc/butc_prototypes.h b/src/butc/butc_prototypes.h new file mode 100644 index 0000000000..be97c93eb1 --- /dev/null +++ b/src/butc/butc_prototypes.h @@ -0,0 +1,36 @@ +/* Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _BUTC_PROTOTYPES_H +#define _BUTC_PROTOTYPES_H + +/* dbentries.c */ + +extern void *dbWatcher(void *); + +/* dump.c */ + +extern void *Dumper(void *); +extern void *DeleteDump(void *); + +/* lwps.c */ +extern void *Restorer(void *); +extern void *Labeller(void *); + +/* recoverdDb.c */ + +extern void *ScanDumps(void *); + +/* tcudbprocs.c */ + +extern void *saveDbToTape(void *); +extern void *restoreDbFromTape(void *); +extern void *KeepAlive(void *); + +#endif + diff --git a/src/butc/dbentries.c b/src/butc/dbentries.c index 37abf66fb8..f44d3a968b 100644 --- a/src/butc/dbentries.c +++ b/src/butc/dbentries.c @@ -316,8 +316,8 @@ waitDbWatcher() #define MAXVOLUMESTOADD 100 int addvolumes = 1; -void -dbWatcher() +void * +dbWatcher(void *unused) { dlqlinkP entryPtr; struct budb_dumpEntry *dumpPtr; @@ -485,4 +485,5 @@ dbWatcher() IOMGR_Sleep(2); #endif } + return NULL; } diff --git a/src/butc/dump.c b/src/butc/dump.c index 56562e4eef..4788f15144 100644 --- a/src/butc/dump.c +++ b/src/butc/dump.c @@ -1117,9 +1117,10 @@ dumpPass(struct dumpRock * dparamsPtr, int passNumber) return (code); } -int -Dumper(struct dumpNode *nodePtr) +void * +Dumper(void *param) { + struct dumpNode *nodePtr = (struct dumpNode *)param; struct dumpRock dparams; struct butm_tapeInfo tapeInfo; int pass; @@ -1369,7 +1370,7 @@ Dumper(struct dumpNode *nodePtr) FreeNode(taskId); /* free the dump node */ LeaveDeviceQueue(deviceLatch); - return (code); + return (void *)(code); } #define BELLTIME 60 /* 60 seconds before a bell rings */ @@ -2030,9 +2031,11 @@ InitToServer(afs_int32 taskId, struct butx_transactionInfo * butxInfoP, /* DeleteDump * */ -int -DeleteDump(struct deleteDumpIf *ptr) +void * +DeleteDump(void *param) { + struct deleteDumpIf *ptr = (struct deleteDumpIf *)param; + afs_int32 taskId; afs_int32 rc, code = 0; afs_uint32 dumpid; diff --git a/src/butc/lwps.c b/src/butc/lwps.c index 3561d5df9b..2096845e54 100644 --- a/src/butc/lwps.c +++ b/src/butc/lwps.c @@ -1743,9 +1743,10 @@ restoreVolume(taskId, restoreInfo, rparamsPtr) * created as a LWP by the server stub, is a pointer to all * the parameters Restorer needs */ -Restorer(newNode) - struct dumpNode *newNode; -{ +void * +Restorer(void *param) { + struct dumpNode *newNode = (struct dumpNode *) param; + afs_int32 code = 0, tcode; afs_uint32 taskId; char *newVolName; @@ -2226,9 +2227,11 @@ updateTapeLabel(labelIfPtr, tapeInfoPtr, newLabelPtr) * specified by