lwp-protoize-20080310

LICENSE IPL10

protoize lwp. make it match pthreads' idea of createprocess
This commit is contained in:
Simon Wilkinson 2008-03-11 17:46:58 +00:00 committed by Derrick Brashear
parent 9473128eb3
commit ff988ead4e
51 changed files with 317 additions and 232 deletions

View File

@ -121,7 +121,7 @@ config: prelude
procmgmt: config procmgmt: config
${COMPILE_PART1} procmgmt ${COMPILE_PART2} ${COMPILE_PART1} procmgmt ${COMPILE_PART2}
util: procmgmt des util: procmgmt des lwp_depinstall
${COMPILE_PART1} util ${COMPILE_PART2} ${COMPILE_PART1} util ${COMPILE_PART2}
audit: util rx rxkad audit: util rx rxkad

View File

@ -1009,7 +1009,7 @@ afs_RXCallBackServer(void)
/* /*
* Donate this process to Rx. * Donate this process to Rx.
*/ */
rx_ServerProc(); rx_ServerProc(NULL);
return (0); return (0);
} /*afs_RXCallBackServer */ } /*afs_RXCallBackServer */

View File

@ -491,8 +491,8 @@ DeleteProc(register struct bnode_proc *abproc)
} }
/* bnode lwp executes this code repeatedly */ /* bnode lwp executes this code repeatedly */
static int static void *
bproc() bproc(void *unused)
{ {
register afs_int32 code; register afs_int32 code;
register struct bnode *tb; register struct bnode *tb;
@ -641,6 +641,7 @@ bproc()
} }
} }
} }
return NULL;
} }
static afs_int32 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 /* Called by IOMGR at low priority on IOMGR's stack shortly after a SIGCHLD
* occurs. Wakes up bproc do redo things */ * occurs. Wakes up bproc do redo things */
int void *
bnode_SoftInt(int asignal) bnode_SoftInt(void *param)
{ {
/* int asignal = (int) param; */
IOMGR_Cancel(bproc_pid); IOMGR_Cancel(bproc_pid);
return 0; return 0;
} }
@ -776,12 +779,10 @@ bnode_SoftInt(int asignal)
void void
bnode_Int(int asignal) bnode_Int(int asignal)
{ {
extern void bozo_ShutdownAndExit();
if (asignal == SIGQUIT) { if (asignal == SIGQUIT) {
IOMGR_SoftSig(bozo_ShutdownAndExit, (char *)asignal); IOMGR_SoftSig(bozo_ShutdownAndExit, (void *) asignal);
} else { } else {
IOMGR_SoftSig(bnode_SoftInt, (char *)asignal); IOMGR_SoftSig(bnode_SoftInt, (void *) asignal);
} }
} }

View File

@ -1655,9 +1655,10 @@ SBOZO_SetRestrictedMode(acall, arestmode)
} }
#endif #endif
void void *
bozo_ShutdownAndExit(int asignal) bozo_ShutdownAndExit(void *param)
{ {
int asignal = (int) param;
int code; int code;
bozo_Log bozo_Log

View File

@ -13,4 +13,7 @@
/* bosserver.c */ /* bosserver.c */
void bozo_Log(char *format, ... ); void bozo_Log(char *format, ... );
/* bosoprocs.c */
void *bozo_ShutdownAndExit(void *arock /* really int asignal */);
#endif #endif

View File

@ -514,8 +514,8 @@ bdrestart(register struct bnode *abnode, char *arock)
#define BOZO_MINSKIP 3600 /* minimum to advance clock */ #define BOZO_MINSKIP 3600 /* minimum to advance clock */
/* lwp to handle system restarts */ /* lwp to handle system restarts */
static int static void *
BozoDaemon() BozoDaemon(void *unused)
{ {
register afs_int32 now; register afs_int32 now;
@ -550,6 +550,7 @@ BozoDaemon()
bnode_ApplyInstance(bdrestart, 0); bnode_ApplyInstance(bdrestart, 0);
} }
} }
return NULL;
} }
#ifdef AFS_AIX32_ENV #ifdef AFS_AIX32_ENV

View File

@ -104,8 +104,8 @@ nextItem(linkPtr)
char *cmdLine; char *cmdLine;
int void *
cmdDispatch() cmdDispatch(void *unused)
{ {
#define MAXV 100 #define MAXV 100
char **targv[MAXV]; /*Ptr to parsed argv stuff */ char **targv[MAXV]; /*Ptr to parsed argv stuff */
@ -119,7 +119,7 @@ cmdDispatch()
code = cmd_ParseLine(internalCmdLine, targv, &targc, MAXV); code = cmd_ParseLine(internalCmdLine, targv, &targc, MAXV);
if (code) { if (code) {
printf("Couldn't parse line: '%s'", afs_error_message(code)); printf("Couldn't parse line: '%s'", afs_error_message(code));
return (1); return (void *)(1);
} }
free(internalCmdLine); free(internalCmdLine);
@ -129,10 +129,11 @@ cmdDispatch()
*/ */
doDispatch(targc, targv, 1); doDispatch(targc, targv, 1);
cmd_FreeArgv(targv); cmd_FreeArgv(targv);
return(0); return(void *)(0);
} }
statusWatcher() void *
statusWatcher(void *unused)
{ {
struct rx_connection *tconn = (struct rc_connection *)0; struct rx_connection *tconn = (struct rc_connection *)0;
statusP curPollPtr = 0; statusP curPollPtr = 0;
@ -394,6 +395,7 @@ statusWatcher()
curPollPtr = 0; curPollPtr = 0;
} /*done */ } /*done */
} /*w */ } /*w */
return NULL;
} }
/* bc_jobNumber /* bc_jobNumber

View File

@ -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

View File

@ -199,9 +199,10 @@ freeDumpTaskVolumeList(vdptr)
* The other half of the dump/restore create process call. In bc_StartDmpRst, * 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. * we allocated a dumpTask entry. Here we do the task and then free the entry.
*/ */
bc_DmpRstStart(aindex) void *
afs_int32 aindex; bc_DmpRstStart(void *param)
{ {
afs_int32 aindex = (afs_int32) param;
register struct bc_dumpTask *tdump; register struct bc_dumpTask *tdump;
register afs_int32 code; register afs_int32 code;

View File

@ -45,7 +45,7 @@ RCSID
#include <afs/budb.h> #include <afs/budb.h>
#include "bc.h" /*Backup Coordinator structs and defs */ #include "bc.h" /*Backup Coordinator structs and defs */
#include "bucoord_prototypes.h"
int localauth, interact; int localauth, interact;
char tcell[64]; char tcell[64];
@ -244,8 +244,6 @@ backupInit()
PROCESS watcherPid; PROCESS watcherPid;
PROCESS pid; /* LWP process ID */ PROCESS pid; /* LWP process ID */
extern statusWatcher();
/* Initialization */ /* Initialization */
initialize_CMD_error_table(); initialize_CMD_error_table();

View File

@ -44,6 +44,7 @@ RCSID
#include "globals.h" #include "globals.h"
#include "afs/audit.h" #include "afs/audit.h"
void *dumpWatcher(void *);
/* dump ubik database - interface routines */ /* dump ubik database - interface routines */
@ -63,9 +64,10 @@ badEntry(dbAddr)
* decode the arguments passed via LWP and dump the database. * decode the arguments passed via LWP and dump the database.
*/ */
setupDbDump(writeFid) void *
int writeFid; setupDbDump(void *param)
{ {
int writeFid = (int)param;
afs_int32 code = 0; afs_int32 code = 0;
code = InitRPC(&dumpSyncPtr->ut, LOCKREAD, 1); code = InitRPC(&dumpSyncPtr->ut, LOCKREAD, 1);
@ -85,7 +87,7 @@ setupDbDump(writeFid)
error_exit: error_exit:
if (dumpSyncPtr->ut) if (dumpSyncPtr->ut)
ubik_EndTrans(dumpSyncPtr->ut); ubik_EndTrans(dumpSyncPtr->ut);
return (code); return (void *)(code);
} }
@ -116,7 +118,6 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
PROCESS dumperPid, watcherPid; PROCESS dumperPid, watcherPid;
int readSize; int readSize;
afs_int32 code = 0; afs_int32 code = 0;
extern dumpWatcher();
if (callPermitted(call) == 0) if (callPermitted(call) == 0)
ERROR(BUDB_NOTPERMITTED); ERROR(BUDB_NOTPERMITTED);
@ -288,7 +289,8 @@ RestoreDbHeader(call, header)
* transactions can proceed. * transactions can proceed.
*/ */
dumpWatcher() void *
dumpWatcher(void *unused)
{ {
afs_int32 code; afs_int32 code;

View File

@ -584,7 +584,7 @@ main(argc, argv)
currentTime = time(0); currentTime = time(0);
LogError(0, "Ready to process requests at %s\n", ctime(&currentTime)); LogError(0, "Ready to process requests at %s\n", ctime(&currentTime));
rx_ServerProc(); /* donate this LWP */ rx_ServerProc(NULL); /* donate this LWP */
error_exit: error_exit:
osi_audit(BUDB_FinishEvent, code, AUD_END); osi_audit(BUDB_FinishEvent, code, AUD_END);

View File

@ -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

View File

@ -316,8 +316,8 @@ waitDbWatcher()
#define MAXVOLUMESTOADD 100 #define MAXVOLUMESTOADD 100
int addvolumes = 1; int addvolumes = 1;
void void *
dbWatcher() dbWatcher(void *unused)
{ {
dlqlinkP entryPtr; dlqlinkP entryPtr;
struct budb_dumpEntry *dumpPtr; struct budb_dumpEntry *dumpPtr;
@ -485,4 +485,5 @@ dbWatcher()
IOMGR_Sleep(2); IOMGR_Sleep(2);
#endif #endif
} }
return NULL;
} }

View File

@ -1117,9 +1117,10 @@ dumpPass(struct dumpRock * dparamsPtr, int passNumber)
return (code); return (code);
} }
int void *
Dumper(struct dumpNode *nodePtr) Dumper(void *param)
{ {
struct dumpNode *nodePtr = (struct dumpNode *)param;
struct dumpRock dparams; struct dumpRock dparams;
struct butm_tapeInfo tapeInfo; struct butm_tapeInfo tapeInfo;
int pass; int pass;
@ -1369,7 +1370,7 @@ Dumper(struct dumpNode *nodePtr)
FreeNode(taskId); /* free the dump node */ FreeNode(taskId); /* free the dump node */
LeaveDeviceQueue(deviceLatch); LeaveDeviceQueue(deviceLatch);
return (code); return (void *)(code);
} }
#define BELLTIME 60 /* 60 seconds before a bell rings */ #define BELLTIME 60 /* 60 seconds before a bell rings */
@ -2030,9 +2031,11 @@ InitToServer(afs_int32 taskId, struct butx_transactionInfo * butxInfoP,
/* DeleteDump /* DeleteDump
* *
*/ */
int void *
DeleteDump(struct deleteDumpIf *ptr) DeleteDump(void *param)
{ {
struct deleteDumpIf *ptr = (struct deleteDumpIf *)param;
afs_int32 taskId; afs_int32 taskId;
afs_int32 rc, code = 0; afs_int32 rc, code = 0;
afs_uint32 dumpid; afs_uint32 dumpid;

View File

@ -1743,9 +1743,10 @@ restoreVolume(taskId, restoreInfo, rparamsPtr)
* created as a LWP by the server stub, <newNode> is a pointer to all * created as a LWP by the server stub, <newNode> is a pointer to all
* the parameters Restorer needs * the parameters Restorer needs
*/ */
Restorer(newNode) void *
struct dumpNode *newNode; Restorer(void *param) {
{ struct dumpNode *newNode = (struct dumpNode *) param;
afs_int32 code = 0, tcode; afs_int32 code = 0, tcode;
afs_uint32 taskId; afs_uint32 taskId;
char *newVolName; char *newVolName;
@ -2226,9 +2227,11 @@ updateTapeLabel(labelIfPtr, tapeInfoPtr, newLabelPtr)
* specified by <label> * specified by <label>
*/ */
Labeller(labelIfPtr) void *
struct labelTapeIf *labelIfPtr; Labeller(void *param)
{ {
struct labelTapeIf *labelIfPtr = (struct labelTapeIf *)param;
struct tc_tapeLabel *label = &labelIfPtr->label; struct tc_tapeLabel *label = &labelIfPtr->label;
struct butm_tapeLabel newTapeLabel; struct butm_tapeLabel newTapeLabel;

View File

@ -692,9 +692,11 @@ getScanTape(afs_int32 taskId, struct butm_tapeInfo *tapeInfoPtr, char *tname, af
* *
*/ */
int void *
ScanDumps(struct scanTapeIf *ptr) ScanDumps(void *param)
{ {
struct scanTapeIf *ptr = (struct scanTapeIf *)param;
struct butm_tapeInfo curTapeInfo; struct butm_tapeInfo curTapeInfo;
struct tapeScanInfo tapeScanInfo; struct tapeScanInfo tapeScanInfo;
afs_uint32 taskId; afs_uint32 taskId;
@ -751,7 +753,7 @@ ScanDumps(struct scanTapeIf *ptr)
free(ptr); free(ptr);
setStatus(taskId, TASK_DONE); setStatus(taskId, TASK_DONE);
LeaveDeviceQueue(deviceLatch); LeaveDeviceQueue(deviceLatch);
return (code); return (void *)(code);
} }

View File

@ -56,6 +56,7 @@ RCSID
#include "afs/butx.h" #include "afs/butx.h"
#define XBSA_TCMAIN #define XBSA_TCMAIN
#include "butc_xbsa.h" #include "butc_xbsa.h"
#include "butc_prototypes.h"
#define N_SECURITY_OBJECTS 3 #define N_SECURITY_OBJECTS 3
#define ERRCODE_RANGE 8 /* from error_table.h */ #define ERRCODE_RANGE 8 /* from error_table.h */
@ -66,7 +67,6 @@ RCSID
struct ubik_client *cstruct; struct ubik_client *cstruct;
extern void TC_ExecuteRequest(); extern void TC_ExecuteRequest();
extern int dbWatcher();
FILE *logIO, *ErrorlogIO, *centralLogIO, *lastLogIO; FILE *logIO, *ErrorlogIO, *centralLogIO, *lastLogIO;
char lFile[AFSDIR_PATH_MAX]; char lFile[AFSDIR_PATH_MAX];
char logFile[256]; char logFile[256];

View File

@ -41,7 +41,8 @@ RCSID
#include <afs/tcdata.h> #include <afs/tcdata.h>
#include "error_macros.h" #include "error_macros.h"
#include "butc_xbsa.h" #include "butc_xbsa.h"
#include "butc_prototypes.h"
static CopyDumpDesc(); static CopyDumpDesc();
static CopyRestoreDesc(); static CopyRestoreDesc();
static CopyTapeSetDesc(); static CopyTapeSetDesc();
@ -147,7 +148,6 @@ STC_LabelTape(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *task
statusP statusPtr = NULL; statusP statusPtr = NULL;
afs_int32 code; afs_int32 code;
extern int Labeller();
extern statusP createStatusNode(); extern statusP createStatusNode();
extern afs_int32 allocTaskId(); extern afs_int32 allocTaskId();
@ -228,7 +228,6 @@ STC_PerformDump(struct rx_call *rxCallId, struct tc_dumpInterface *tcdiPtr, tc_d
afs_int32 code = 0; afs_int32 code = 0;
extern statusP createStatusNode(); extern statusP createStatusNode();
extern Dumper();
if (callPermitted(rxCallId) == 0) if (callPermitted(rxCallId) == 0)
return (TC_NOTPERMITTED); return (TC_NOTPERMITTED);
@ -326,7 +325,6 @@ STC_PerformRestore(struct rx_call *acid, char *dumpSetName, tc_restoreArray *are
PROCESS pid; PROCESS pid;
#endif #endif
extern int Restorer();
extern statusP createStatusNode(); extern statusP createStatusNode();
if (callPermitted(acid) == 0) if (callPermitted(acid) == 0)
@ -425,7 +423,6 @@ STC_RestoreDb(struct rx_call *rxCall, afs_uint32 *taskId)
statusP statusPtr; statusP statusPtr;
afs_int32 code = 0; afs_int32 code = 0;
extern afs_int32 restoreDbFromTape();
extern statusP createStatusNode(); extern statusP createStatusNode();
extern afs_int32 allocTaskId(); extern afs_int32 allocTaskId();
@ -496,7 +493,6 @@ STC_SaveDb(struct rx_call *rxCall, Date archiveTime, afs_uint32 *taskId)
afs_int32 code = 0; afs_int32 code = 0;
struct saveDbIf *ptr; struct saveDbIf *ptr;
extern afs_int32 saveDbToTape();
extern statusP createStatusNode(); extern statusP createStatusNode();
extern afs_int32 allocTaskId(); extern afs_int32 allocTaskId();
@ -579,7 +575,6 @@ STC_ScanDumps(struct rx_call *acid, afs_int32 addDbFlag, afs_uint32 *taskId)
statusP statusPtr; statusP statusPtr;
afs_int32 code = 0; afs_int32 code = 0;
extern afs_int32 ScanDumps();
extern afs_int32 allocTaskId(); extern afs_int32 allocTaskId();
extern statusP createStatusNode(); extern statusP createStatusNode();
@ -671,7 +666,6 @@ STC_DeleteDump(struct rx_call *acid, afs_uint32 dumpID, afs_uint32 *taskId)
PROCESS pid; PROCESS pid;
#endif #endif
#endif #endif
extern afs_int32 DeleteDump();
extern statusP createStatusNode(); extern statusP createStatusNode();
extern afs_int32 allocTaskId(); extern afs_int32 allocTaskId();

View File

@ -56,6 +56,7 @@ static void initTapeBuffering();
static writeDbDump(); static writeDbDump();
static restoreDbEntries(); static restoreDbEntries();
void * KeepAlive(void *);
/* CreateDBDump /* CreateDBDump
* create a dump entry for a saved database * create a dump entry for a saved database
*/ */
@ -413,8 +414,6 @@ writeDbDump(tapeInfoPtr, taskId, expires, dumpid)
extern struct tapeConfig globalTapeConfig; extern struct tapeConfig globalTapeConfig;
extern struct udbHandleS udbHandle; extern struct udbHandleS udbHandle;
extern int KeepAlive();
blockSize = BUTM_BLKSIZE; blockSize = BUTM_BLKSIZE;
writeBlock = (char *)malloc(BUTM_BLOCKSIZE); writeBlock = (char *)malloc(BUTM_BLOCKSIZE);
if (!writeBlock) if (!writeBlock)
@ -624,10 +623,10 @@ writeDbDump(tapeInfoPtr, taskId, expires, dumpid)
* dump backup database to tape * dump backup database to tape
*/ */
afs_int32 void *
saveDbToTape(saveDbIfPtr) saveDbToTape(void *param)
struct saveDbIf *saveDbIfPtr;
{ {
struct saveDbIf *saveDbIfPtr = (struct saveDbIf *)param;
afs_int32 code = 0; afs_int32 code = 0;
afs_int32 i; afs_int32 i;
int wroteLabel; int wroteLabel;
@ -1018,10 +1017,10 @@ restoreDbEntries(tapeInfoPtr, rstTapeInfoPtr)
* restore the backup database from tape. * restore the backup database from tape.
*/ */
afs_int32 void *
restoreDbFromTape(taskId) restoreDbFromTape(void *param)
afs_uint32 taskId;
{ {
afs_uint32 taskId = (void *)param;
afs_int32 code = 0; afs_int32 code = 0;
afs_int32 i; afs_int32 i;
struct butm_tapeInfo tapeInfo; struct butm_tapeInfo tapeInfo;
@ -1107,7 +1106,7 @@ restoreDbFromTape(taskId)
LeaveDeviceQueue(deviceLatch); LeaveDeviceQueue(deviceLatch);
setStatus(taskId, TASK_DONE); setStatus(taskId, TASK_DONE);
return (code); return (void *)(code);
} }
/* KeepAlive /* KeepAlive
@ -1119,8 +1118,8 @@ restoreDbFromTape(taskId)
* *
* Use the same udbHandle as writeDbDump so we go to the same server. * Use the same udbHandle as writeDbDump so we go to the same server.
*/ */
int void *
KeepAlive() KeepAlive(void *unused)
{ {
charListT charList; charListT charList;
afs_int32 code; afs_int32 code;

View File

@ -232,8 +232,8 @@ fsprobe_Cleanup(a_releaseMem)
* Side Effects: * Side Effects:
* As advertised. * As advertised.
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
static void static void *
fsprobe_LWP() fsprobe_LWP(void *unused)
{ /*fsprobe_LWP */ { /*fsprobe_LWP */
static char rn[] = "fsprobe_LWP"; /*Routine name */ static char rn[] = "fsprobe_LWP"; /*Routine name */
@ -389,6 +389,8 @@ fsprobe_LWP()
fprintf(stderr, "[%s] IOMGR_Select returned code %d\n", rn, code); fprintf(stderr, "[%s] IOMGR_Select returned code %d\n", rn, code);
} /*Service loop */ } /*Service loop */
free(stats64.ViceStatistics64_val); free(stats64.ViceStatistics64_val);
return NULL;
} /*fsprobe_LWP */ } /*fsprobe_LWP */
/*list all the partitions on <aserver> */ /*list all the partitions on <aserver> */

View File

@ -14,7 +14,7 @@
* Implementation of the gator curses window facility. * Implementation of the gator curses window facility.
* *
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
#define IGNORE_STDS_H
#include <afsconfig.h> #include <afsconfig.h>
#include <afs/param.h> #include <afs/param.h>
@ -40,6 +40,8 @@ RCSID
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <lwp.h>
#include "gtxcurseswin.h" /*Interface definition */ #include "gtxcurseswin.h" /*Interface definition */
#include "gtxobjects.h" #include "gtxobjects.h"
#include "gtxframe.h" #include "gtxframe.h"

View File

@ -7,7 +7,6 @@
* directory or online at http://www.openafs.org/dl/license10.html * directory or online at http://www.openafs.org/dl/license10.html
*/ */
#define IGNORE_STDS_H
#include <afsconfig.h> #include <afsconfig.h>
#include <afs/param.h> #include <afs/param.h>

View File

@ -7,7 +7,6 @@
* directory or online at http://www.openafs.org/dl/license10.html * directory or online at http://www.openafs.org/dl/license10.html
*/ */
#define IGNORE_STDS_H
#include <afsconfig.h> #include <afsconfig.h>
#include <afs/param.h> #include <afs/param.h>
@ -29,9 +28,11 @@ RCSID
/* process input */ /* process input */
gtx_InputServer(awin) void *
register struct gwin *awin; gtx_InputServer(void *param)
{ {
struct gwin *awin = (struct gwin *) param;
register int tc; register int tc;
register int code; register int code;
register struct gtx_frame *tframe; register struct gtx_frame *tframe;

View File

@ -491,6 +491,6 @@ main(argc, argv)
} }
ViceLog(0, ("Starting to process AuthServer requests\n")); ViceLog(0, ("Starting to process AuthServer requests\n"));
rx_ServerProc(); /* donate this LWP */ rx_ServerProc(NULL); /* donate this LWP */
return 0; return 0;
} }

View File

@ -104,8 +104,8 @@ char udptgsServerPrincipal[256];
int fiveminutes = 300; int fiveminutes = 300;
static static void *
FiveMinuteCheckLWP() FiveMinuteCheckLWP(void *unused)
{ {
printf("start 5 min check lwp\n"); printf("start 5 min check lwp\n");
@ -115,6 +115,7 @@ FiveMinuteCheckLWP()
/* close the log so it can be removed */ /* close the log so it can be removed */
ReOpenLog(AFSDIR_SERVER_KALOG_FILEPATH); /* no trunc, just append */ ReOpenLog(AFSDIR_SERVER_KALOG_FILEPATH); /* no trunc, just append */
} }
return NULL;
} }
@ -825,8 +826,8 @@ process_udp_request(ksoc, pkt)
return; return;
} }
static void static void *
SocketListener() SocketListener(void *unused)
{ {
fd_set rfds; fd_set rfds;
struct timeval tv; struct timeval tv;
@ -908,6 +909,8 @@ SocketListener()
sock_kerb5 = -1; sock_kerb5 = -1;
} }
printf("UDP SocketListener exiting due to error\n"); printf("UDP SocketListener exiting due to error\n");
return NULL;
} }
#if MAIN #if MAIN

View File

@ -97,7 +97,7 @@ typedef unsigned char bool;
#define NSIG 8*sizeof(sigset_t) #define NSIG 8*sizeof(sigset_t)
#endif #endif
static int SignalSignals(); static int SignalSignals(void);
/********************************\ /********************************\
* * * *
@ -148,8 +148,8 @@ static int sigDelivered[NSIG]; /* True for signals delivered so far.
to write it */ to write it */
/* software 'signals' */ /* software 'signals' */
#define NSOFTSIG 4 #define NSOFTSIG 4
static int (*sigProc[NSOFTSIG])(); static void *(*sigProc[NSOFTSIG])(void *);
static char *sigRock[NSOFTSIG]; static void *sigRock[NSOFTSIG];
static struct IoRequest *iorFreeList = 0; static struct IoRequest *iorFreeList = 0;
@ -208,7 +208,7 @@ fd_set *IOMGR_AllocFDSet(void)
#define FreeRequest(x) ((x)->next = iorFreeList, iorFreeList = (x)) #define FreeRequest(x) ((x)->next = iorFreeList, iorFreeList = (x))
static struct IoRequest *NewRequest() static struct IoRequest *NewRequest(void)
{ {
struct IoRequest *request; struct IoRequest *request;
@ -391,7 +391,7 @@ static int FDSetEmpty(int nfds, fd_set *fds)
static fd_set IOMGR_readfds, IOMGR_writefds, IOMGR_exceptfds; static fd_set IOMGR_readfds, IOMGR_writefds, IOMGR_exceptfds;
static int IOMGR_nfds = 0; static int IOMGR_nfds = 0;
static int IOMGR(void *dummy) static void *IOMGR(void *dummy)
{ {
for (;;) { for (;;) {
int code; int code;
@ -620,7 +620,7 @@ static int IOMGR(void *dummy)
} }
LWP_DispatchProcess(); LWP_DispatchProcess();
} }
return -1; /* keeps compilers happy. */ return (void *)-1; /* keeps compilers happy. */
} }
/************************\ /************************\
@ -677,8 +677,7 @@ static void SignalTimeout(int code, struct timeval *timeout)
* signalling routines, above). * * signalling routines, above). *
* * * *
\*****************************************************/ \*****************************************************/
static void SigHandler (signo) static void SigHandler (int signo)
int signo;
{ {
if (badsig(signo) || (sigsHandled & mysigmask(signo)) == 0) if (badsig(signo) || (sigsHandled & mysigmask(signo)) == 0)
return; /* can't happen. */ return; /* can't happen. */
@ -695,7 +694,7 @@ static int SignalSignals (void)
{ {
bool gotone = FALSE; bool gotone = FALSE;
register int i; register int i;
register int (*p)(); register void *(*p)(void *);
afs_int32 stackSize; afs_int32 stackSize;
anySigsDelivered = FALSE; anySigsDelivered = FALSE;
@ -704,9 +703,9 @@ static int SignalSignals (void)
stackSize = (AFS_LWP_MINSTACKSIZE < lwp_MaxStackSeen? lwp_MaxStackSeen : AFS_LWP_MINSTACKSIZE); stackSize = (AFS_LWP_MINSTACKSIZE < lwp_MaxStackSeen? lwp_MaxStackSeen : AFS_LWP_MINSTACKSIZE);
for (i=0; i < NSOFTSIG; i++) { for (i=0; i < NSOFTSIG; i++) {
PROCESS pid; PROCESS pid;
if (p=sigProc[i]) /* This yields!!! */ if ((p=sigProc[i])) /* This yields!!! */
LWP_CreateProcess2(p, stackSize, LWP_NORMAL_PRIORITY, LWP_CreateProcess2(p, stackSize, LWP_NORMAL_PRIORITY,
(void *) sigRock[i], "SignalHandler", &pid); sigRock[i], "SignalHandler", &pid);
sigProc[i] = 0; sigProc[i] = 0;
} }
@ -730,9 +729,8 @@ static int SignalSignals (void)
/* Keep IOMGR process id */ /* Keep IOMGR process id */
static PROCESS IOMGR_Id = NULL; static PROCESS IOMGR_Id = NULL;
int IOMGR_SoftSig(aproc, arock) int IOMGR_SoftSig(void *(*aproc)(void *), void *arock)
int (*aproc)(); {
char *arock; {
register int i; register int i;
for (i=0;i<NSOFTSIG;i++) { for (i=0;i<NSOFTSIG;i++) {
if (sigProc[i] == 0) { if (sigProc[i] == 0) {
@ -753,7 +751,6 @@ unsigned char allOnes[100];
int IOMGR_Initialize(void) int IOMGR_Initialize(void)
{ {
extern int TM_Init();
PROCESS pid; PROCESS pid;
/* If lready initialized, just return */ /* If lready initialized, just return */
@ -776,7 +773,7 @@ int IOMGR_Initialize(void)
"IO MANAGER", &IOMGR_Id); "IO MANAGER", &IOMGR_Id);
} }
int IOMGR_Finalize() int IOMGR_Finalize(void)
{ {
int status; int status;
@ -864,10 +861,8 @@ int IOMGR_Poll(void) {
return 0; return 0;
} }
int IOMGR_Select(fds, readfds, writefds, exceptfds, timeout) int IOMGR_Select(int fds, fd_set *readfds, fd_set *writefds,
int fds; fd_set *exceptfds, struct timeval *timeout)
fd_set *readfds, *writefds, *exceptfds;
struct timeval *timeout;
{ {
register struct IoRequest *request; register struct IoRequest *request;
int result; int result;
@ -888,7 +883,9 @@ int IOMGR_Select(fds, readfds, writefds, exceptfds, timeout)
#ifdef DEBUG #ifdef DEBUG
if (lwp_debug != 0) puts("[Polling SELECT]"); if (lwp_debug != 0) puts("[Polling SELECT]");
#endif /* DEBUG */ #endif /* DEBUG */
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_NT40_ENV)
again: again:
#endif
code = select(fds, readfds, writefds, exceptfds, timeout); code = select(fds, readfds, writefds, exceptfds, timeout);
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV) #if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV)
/* /*

View File

@ -197,9 +197,7 @@ Afs_Lock_ReleaseW(struct Lock *lock)
/* release a write lock and sleep on an address, atomically */ /* release a write lock and sleep on an address, atomically */
void void
LWP_WaitProcessR(addr, alock) LWP_WaitProcessR(register void *addr, register struct Lock *alock)
register char *addr;
register struct Lock *alock;
{ {
ReleaseReadLock(alock); ReleaseReadLock(alock);
LWP_WaitProcess(addr); LWP_WaitProcess(addr);
@ -207,9 +205,7 @@ LWP_WaitProcessR(addr, alock)
/* release a write lock and sleep on an address, atomically */ /* release a write lock and sleep on an address, atomically */
void void
LWP_WaitProcessW(addr, alock) LWP_WaitProcessW(register void *addr, register struct Lock *alock)
register char *addr;
register struct Lock *alock;
{ {
ReleaseWriteLock(alock); ReleaseWriteLock(alock);
LWP_WaitProcess(addr); LWP_WaitProcess(addr);
@ -217,9 +213,7 @@ LWP_WaitProcessW(addr, alock)
/* release a write lock and sleep on an address, atomically */ /* release a write lock and sleep on an address, atomically */
void void
LWP_WaitProcessS(addr, alock) LWP_WaitProcessS(register void *addr, register struct Lock *alock)
register char *addr;
register struct Lock *alock;
{ {
ReleaseSharedLock(alock); ReleaseSharedLock(alock);
LWP_WaitProcess(addr); LWP_WaitProcess(addr);

View File

@ -68,6 +68,7 @@ struct Lock {
extern void Afs_Lock_Obtain(struct Lock *lock, int how); extern void Afs_Lock_Obtain(struct Lock *lock, int how);
extern void Afs_Lock_ReleaseR(struct Lock *lock); extern void Afs_Lock_ReleaseR(struct Lock *lock);
extern void Afs_Lock_ReleaseW(struct Lock *lock); extern void Afs_Lock_ReleaseW(struct Lock *lock);
extern void Afs_Lock_WakeupR(struct Lock *lock);
void Lock_Init(struct Lock *lock); void Lock_Init(struct Lock *lock);
void Lock_Destroy(struct Lock *lock); void Lock_Destroy(struct Lock *lock);

View File

@ -100,20 +100,23 @@ extern char PRE_Block; /* from preempt.c */
} while (0) } while (0)
#endif #endif
static int Dispatcher(); static void *Dispatcher(void *);
static int Create_Process_Part2(); static void *Create_Process_Part2(void *);
static int Exit_LWP(); static void *Exit_LWP(void *);
static afs_int32 Initialize_Stack(); static afs_int32 Initialize_Stack(char *stackptr, int stacksize);
static int Stack_Used(); static int Stack_Used(register char *stackptr, int stacksize);
char (*RC_to_ASCII());
static void Abort_LWP(); static void Abort_LWP(char *msg);
static void Overflow_Complain(); static void Overflow_Complain(void);
static void Initialize_PCB(); static void Initialize_PCB(PROCESS temp, int priority, char *stack,
static void Dispose_of_Dead_PCB(); int stacksize, void *(*ep)(void *), void *parm,
static void Free_PCB(); char *name);
static int Internal_Signal(); static void Dispose_of_Dead_PCB(PROCESS cur);
static purge_dead_pcbs(); static void Free_PCB(PROCESS pid);
static int Internal_Signal(void *event);
static int purge_dead_pcbs(void);
static int LWP_MwaitProcess(int wcount, void *evlist[]);
#define MAX_PRIORITIES (LWP_MAX_PRIORITY+1) #define MAX_PRIORITIES (LWP_MAX_PRIORITY+1)
@ -121,7 +124,9 @@ struct QUEUE {
PROCESS head; PROCESS head;
int count; int count;
} runnable[MAX_PRIORITIES], blocked, qwaiting; } runnable[MAX_PRIORITIES], blocked, qwaiting;
/* Invariant for runnable queues: The head of each queue points to the currently running process if it is in that queue, or it points to the next process in that queue that should run. */ /* Invariant for runnable queues: The head of each queue points to the
* currently running process if it is in that queue, or it points to the
* next process in that queue that should run. */
/* Offset of stack field within pcb -- used by stack checking stuff */ /* Offset of stack field within pcb -- used by stack checking stuff */
int stack_offset; int stack_offset;
@ -262,7 +267,7 @@ reserveFromStack(register afs_int32 size)
#endif #endif
int int
LWP_CreateProcess(int (*ep) (), int stacksize, int priority, void *parm, LWP_CreateProcess(void *(*ep) (void *), int stacksize, int priority, void *parm,
char *name, PROCESS * pid) char *name, PROCESS * pid)
{ {
PROCESS temp, temp2; PROCESS temp, temp2;
@ -419,7 +424,7 @@ LWP_CreateProcess(int (*ep) (), int stacksize, int priority, void *parm,
#ifdef AFS_AIX32_ENV #ifdef AFS_AIX32_ENV
int int
LWP_CreateProcess2(int (*ep) (), int stacksize, int priority, void *parm, LWP_CreateProcess2(void *(*ep) (void *), int stacksize, int priority, void *parm,
char *name, PROCESS * pid) char *name, PROCESS * pid)
{ {
PROCESS temp, temp2; PROCESS temp, temp2;
@ -650,7 +655,7 @@ LWP_InitializeProcessSupport(int priority, PROCESS * pid)
} }
int int
LWP_INTERNALSIGNAL(char *event, int yield) LWP_INTERNALSIGNAL(void *event, int yield)
{ /* signal the occurence of an event */ { /* signal the occurence of an event */
Debug(2, ("Entered LWP_SignalProcess")); Debug(2, ("Entered LWP_SignalProcess"));
if (lwp_init) { if (lwp_init) {
@ -689,9 +694,9 @@ LWP_TerminateProcessSupport(void)
} }
int int
LWP_WaitProcess(char *event) LWP_WaitProcess(void *event)
{ /* wait on a single event */ { /* wait on a single event */
char *tempev[2]; void *tempev[2];
Debug(2, ("Entered Wait_Process")); Debug(2, ("Entered Wait_Process"));
if (event == NULL) if (event == NULL)
@ -702,7 +707,7 @@ LWP_WaitProcess(char *event)
} }
int int
LWP_MwaitProcess(int wcount, char *evlist[]) LWP_MwaitProcess(int wcount, void *evlist[])
{ /* wait on m of n events */ { /* wait on m of n events */
register int ecount, i; register int ecount, i;
@ -730,8 +735,8 @@ LWP_MwaitProcess(int wcount, char *evlist[])
if (ecount > lwp_cpptr->eventlistsize) { if (ecount > lwp_cpptr->eventlistsize) {
lwp_cpptr->eventlist = lwp_cpptr->eventlist =
(char **)realloc(lwp_cpptr->eventlist, (void **)realloc(lwp_cpptr->eventlist,
ecount * sizeof(char *)); ecount * sizeof(void *));
lwp_cpptr->eventlistsize = ecount; lwp_cpptr->eventlistsize = ecount;
} }
for (i = 0; i < ecount; i++) for (i = 0; i < ecount; i++)
@ -781,14 +786,14 @@ Abort_LWP(char *msg)
Dump_Processes(); Dump_Processes();
#endif #endif
if (LWPANCHOR.outersp == NULL) if (LWPANCHOR.outersp == NULL)
Exit_LWP(); Exit_LWP(NULL);
else else
savecontext(Exit_LWP, &tempcontext, LWPANCHOR.outersp); savecontext(Exit_LWP, &tempcontext, LWPANCHOR.outersp);
return; return;
} }
static int static void *
Create_Process_Part2(void) Create_Process_Part2(void *unused)
{ /* creates a context for the new process */ { /* creates a context for the new process */
PROCESS temp; PROCESS temp;
@ -876,8 +881,8 @@ purge_dead_pcbs(void)
int LWP_TraceProcesses = 0; int LWP_TraceProcesses = 0;
static int static void *
Dispatcher(void) Dispatcher(void *unused)
{ /* Lightweight process dispatcher */ { /* Lightweight process dispatcher */
register int i; register int i;
#ifdef DEBUG #ifdef DEBUG
@ -928,7 +933,8 @@ Dispatcher(void)
printf("stackcheck = %u: stack = %u \n", lwp_cpptr->stackcheck, printf("stackcheck = %u: stack = %u \n", lwp_cpptr->stackcheck,
*(int *)lwp_cpptr->stack); *(int *)lwp_cpptr->stack);
printf("topstack = 0x%x: stackptr = 0x%x: stacksize = 0x%x\n", printf("topstack = 0x%x: stackptr = 0x%x: stacksize = 0x%x\n",
lwp_cpptr->context.topstack, lwp_cpptr->stack, (unsigned int)lwp_cpptr->context.topstack,
(unsigned int)lwp_cpptr->stack,
lwp_cpptr->stacksize); lwp_cpptr->stacksize);
switch (lwp_overflowAction) { switch (lwp_overflowAction) {
@ -1003,8 +1009,8 @@ Dispose_of_Dead_PCB(PROCESS cur)
*/ */
} }
static int static void *
Exit_LWP(void) Exit_LWP(void *unused)
{ {
abort(); abort();
} }
@ -1028,7 +1034,7 @@ Free_PCB(PROCESS pid)
static void static void
Initialize_PCB(PROCESS temp, int priority, char *stack, int stacksize, Initialize_PCB(PROCESS temp, int priority, char *stack, int stacksize,
int (*ep) (), void *parm, char *name) void *(*ep) (void *), void *parm, char *name)
{ {
register int i = 0; register int i = 0;
@ -1038,7 +1044,7 @@ Initialize_PCB(PROCESS temp, int priority, char *stack, int stacksize,
i++; i++;
temp->name[31] = '\0'; temp->name[31] = '\0';
temp->status = READY; temp->status = READY;
temp->eventlist = (char **)malloc(EVINITSIZE * sizeof(char *)); temp->eventlist = (void **)malloc(EVINITSIZE * sizeof(void *));
temp->eventlistsize = EVINITSIZE; temp->eventlistsize = EVINITSIZE;
temp->eventcnt = 0; temp->eventcnt = 0;
temp->wakevent = 0; temp->wakevent = 0;
@ -1066,7 +1072,7 @@ Initialize_PCB(PROCESS temp, int priority, char *stack, int stacksize,
} }
static int static int
Internal_Signal(register char *event) Internal_Signal(register void *event)
{ {
int rc = LWP_ENOWAIT; int rc = LWP_ENOWAIT;
register int i; register int i;
@ -1256,13 +1262,13 @@ plim(char *name, afs_int32 lc, uchar_t hard)
#ifdef AFS_SUN5_ENV #ifdef AFS_SUN5_ENV
int int
LWP_NoYieldSignal(char *event) LWP_NoYieldSignal(void *event)
{ {
return (LWP_INTERNALSIGNAL(event, 0)); return (LWP_INTERNALSIGNAL(event, 0));
} }
int int
LWP_SignalProcess(char *event) LWP_SignalProcess(void *event)
{ {
return (LWP_INTERNALSIGNAL(event, 1)); return (LWP_INTERNALSIGNAL(event, 1));
} }
@ -1287,7 +1293,7 @@ pthread_key_t lwp_process_key; /* Key associating lwp pid with thread */
typedef struct event { typedef struct event {
struct event *next; /* next in hash chain */ struct event *next; /* next in hash chain */
char *event; /* lwp event: an address */ void *event; /* lwp event: an address */
int refcount; /* Is it in use? */ int refcount; /* Is it in use? */
pthread_cond_t cond; /* Currently associated condition variable */ pthread_cond_t cond; /* Currently associated condition variable */
int seq; /* Sequence number: this is incremented int seq; /* Sequence number: this is incremented
@ -1512,7 +1518,7 @@ LWP_TerminateProcessSupport(void)
/* Get and initialize event structure corresponding to lwp event (i.e. address) */ /* Get and initialize event structure corresponding to lwp event (i.e. address) */
static event_t * static event_t *
getevent(char *event) getevent(void *event)
{ {
event_t *evp, *newp; event_t *evp, *newp;
int hashcode; int hashcode;
@ -1546,7 +1552,7 @@ getevent(char *event)
#define relevent(evp) ((evp)->refcount--) #define relevent(evp) ((evp)->refcount--)
int int
LWP_WaitProcess(char *event) LWP_WaitProcess(void *event)
{ /* wait on a single event */ { /* wait on a single event */
struct event *ev; struct event *ev;
int seq; int seq;
@ -1570,7 +1576,7 @@ LWP_MwaitProcess(int wcount, char *evlist[])
} }
int int
LWP_NoYieldSignal(char *event) LWP_NoYieldSignal(void *event)
{ {
struct event *ev; struct event *ev;
debugf(("%s: no yield signal (%x)\n", lwp_process_string(), event)); debugf(("%s: no yield signal (%x)\n", lwp_process_string(), event));
@ -1586,7 +1592,7 @@ LWP_NoYieldSignal(char *event)
} }
int int
LWP_SignalProcess(char *event) LWP_SignalProcess(void *event)
{ {
struct event *ev; struct event *ev;
debugf(("%s: signal process (%x)\n", lwp_process_string(), event)); debugf(("%s: signal process (%x)\n", lwp_process_string(), event));

View File

@ -223,7 +223,7 @@ struct lwp_pcb { /* process control block */
char blockflag; /* if (blockflag), process blocked */ char blockflag; /* if (blockflag), process blocked */
char eventlistsize; /* size of eventlist array */ char eventlistsize; /* size of eventlist array */
char padding; /* force 32-bit alignment */ char padding; /* force 32-bit alignment */
char **eventlist; /* ptr to array of eventids */ void **eventlist; /* ptr to array of eventids */
int eventcnt; /* no. of events currently in eventlist array */ int eventcnt; /* no. of events currently in eventlist array */
int wakevent; /* index of eventid causing wakeup */ int wakevent; /* index of eventid causing wakeup */
int waitcnt; /* min number of events awaited */ int waitcnt; /* min number of events awaited */
@ -232,7 +232,7 @@ struct lwp_pcb { /* process control block */
char *stack; /* ptr to process stack */ char *stack; /* ptr to process stack */
int stacksize; /* size of stack */ int stacksize; /* size of stack */
int stackcheck; /* first word of stack for overflow checking */ int stackcheck; /* first word of stack for overflow checking */
int (*ep) (); /* initial entry point */ void *(*ep)(void *); /* initial entry point */
char *parm; /* initial parm for process */ char *parm; /* initial parm for process */
struct lwp_context struct lwp_context
context; /* saved context for next dispatch */ context; /* saved context for next dispatch */
@ -348,7 +348,7 @@ extern void IOMGR_Sleep(int seconds);
extern int IOMGR_Cancel(PROCESS pid); extern int IOMGR_Cancel(PROCESS pid);
extern int IOMGR_Initialize(void); extern int IOMGR_Initialize(void);
extern void IOMGR_FreeFDSet(fd_set * fds); extern void IOMGR_FreeFDSet(fd_set * fds);
extern int IOMGR_SoftSig(int (*aproc) (), char *arock); extern int IOMGR_SoftSig(void *(*aproc) (void *), void *arock);
/* fasttime.c */ /* fasttime.c */
@ -374,15 +374,22 @@ extern int LWP_QWait(void);
extern int LWP_QSignal(PROCESS pid); extern int LWP_QSignal(PROCESS pid);
#else #else
extern int LWP_CurrentProcess(PROCESS * pid); extern int LWP_CurrentProcess(PROCESS * pid);
extern int LWP_INTERNALSIGNAL(char *event, int yield); extern int LWP_INTERNALSIGNAL(void *event, int yield);
extern int LWP_InitializeProcessSupport(int priority, PROCESS * pid); extern int LWP_InitializeProcessSupport(int priority, PROCESS * pid);
extern int LWP_CreateProcess(int (*ep) (), int stacksize, int priority, extern int LWP_CreateProcess(void *(*ep)(void *), int stacksize, int priority,
void *parm, char *name, PROCESS * pid); void *parm, char *name, PROCESS * pid);
extern int LWP_DestroyProcess(PROCESS pid); extern int LWP_DestroyProcess(PROCESS pid);
extern int LWP_WaitProcess(char *event); extern int LWP_DispatchProcess(void);
extern int LWP_WaitProcess(void *event);
extern PROCESS LWP_ThreadId(void); extern PROCESS LWP_ThreadId(void);
extern int LWP_QWait(void);
extern int LWP_QSignal(register PROCESS pid);
#endif #endif
extern afs_int32 savecontext(void *(*ep)(void *),
struct lwp_context *savearea, char *sp);
extern void returnto(struct lwp_context *savearea);
#ifdef AFS_LINUX24_ENV #ifdef AFS_LINUX24_ENV
/* max time we are allowed to spend in a select call on Linux to avoid /* max time we are allowed to spend in a select call on Linux to avoid
lost signal issues */ lost signal issues */

View File

@ -34,7 +34,7 @@ PRE_InitPreempt(struct timeval *slice)
} }
int int
PRE_EndPreempt() PRE_EndPreempt(void)
{ {
return LWP_SUCCESS; return LWP_SUCCESS;
} }

View File

@ -31,7 +31,7 @@ extern char PRE_Block; /* used in lwp.c and process.s */
#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) #if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H)
afs_int32 afs_int32
savecontext(char (*ep) (), struct lwp_context *savearea, char *newsp) savecontext(void (*ep) (void *dummy), struct lwp_context *savearea, char *newsp)
{ {
#if defined(AFS_LINUX20_ENV) #if defined(AFS_LINUX20_ENV)
/* getcontext does not export stack info */ /* getcontext does not export stack info */
@ -69,8 +69,7 @@ savecontext(char (*ep) (), struct lwp_context *savearea, char *newsp)
} }
void void
returnto(savearea) returnto(struct lwp_context *savearea)
struct lwp_context *savearea;
{ {
PRE_Block = 0; PRE_Block = 0;
@ -173,7 +172,7 @@ static int ptr_mangle(int p)
afs_int32 afs_int32
savecontext(ep, savearea, sp) savecontext(ep, savearea, sp)
char (*ep) (); void (*ep) ();
struct lwp_context *savearea; struct lwp_context *savearea;
char *sp; char *sp;
{ {
@ -233,7 +232,7 @@ savecontext(ep, savearea, sp)
return 0; return 0;
} }
afs_int32 void
returnto(struct lwp_context * savearea) returnto(struct lwp_context * savearea)
{ {
#if defined(DEBUG) #if defined(DEBUG)
@ -249,7 +248,7 @@ returnto(struct lwp_context * savearea)
#endif #endif
PRE_Block = 0; PRE_Block = 0;
longjmp(savearea->setjmp_buffer, 2); longjmp(savearea->setjmp_buffer, 2);
return 0; return;
} }
#endif #endif

View File

@ -30,13 +30,14 @@ extern int TM_eql(struct timeval *t1, struct timeval *t2);
#ifndef _TIMER_IMPL_ #ifndef _TIMER_IMPL_
#define Tm_Insert(list, elem) openafs_insque(list, elem) #define Tm_Insert(list, elem) openafs_insque(list, elem)
#define TM_Remove(list, elem) openafs_remque(elem) #define TM_Remove(list, elem) openafs_remque(elem)
extern int TM_Rescan(); extern int TM_Rescan(struct TM_Elem *tlist);
void TM_Insert(); void TM_Insert(struct TM_Elem *tlistPtr, struct TM_Elem *elem);
extern struct TM_Elem *TM_GetExpired(); extern struct TM_Elem *TM_GetExpired(struct TM_Elem *tlist);
extern struct TM_Elem *TM_GetEarliest(); extern struct TM_Elem *TM_GetEarliest(struct TM_Elem *tlist);
#endif #endif
extern int TM_Final(); extern int TM_Init(register struct TM_Elem **list);
extern int TM_Final(register struct TM_Elem **list);
#define FOR_ALL_ELTS(var, list, body)\ #define FOR_ALL_ELTS(var, list, body)\
{\ {\

View File

@ -134,8 +134,8 @@ rxk_Listener(void)
/* This is the server process request loop. The server process loop /* This is the server process request loop. The server process loop
* becomes a listener thread when rxi_ServerProc returns, and stays * becomes a listener thread when rxi_ServerProc returns, and stays
* listener thread until rxi_ListenerProc returns. */ * listener thread until rxi_ListenerProc returns. */
void void *
rx_ServerProc(void) rx_ServerProc(void *unused)
{ {
osi_socket sock; osi_socket sock;
int threadID; int threadID;

View File

@ -718,7 +718,7 @@ rx_StartServer(int donateMe)
(*registerProgram) (pid, name); (*registerProgram) (pid, name);
#endif /* KERNEL */ #endif /* KERNEL */
#endif /* AFS_NT40_ENV */ #endif /* AFS_NT40_ENV */
rx_ServerProc(); /* Never returns */ rx_ServerProc(NULL); /* Never returns */
} }
#ifdef RX_ENABLE_TSFPQ #ifdef RX_ENABLE_TSFPQ
/* no use leaving packets around in this thread's local queue if /* no use leaving packets around in this thread's local queue if

View File

@ -273,8 +273,8 @@ osi_AssertFailK(const char *expr, const char *file, int line)
#ifndef UKERNEL #ifndef UKERNEL
/* This is the server process request loop. Kernel server /* This is the server process request loop. Kernel server
* processes never become listener threads */ * processes never become listener threads */
void void *
rx_ServerProc(void) rx_ServerProc(void *unused)
{ {
int threadID; int threadID;

View File

@ -75,7 +75,7 @@ rxi_Wakeup(void *addr)
} }
PROCESS rx_listenerPid = 0; /* LWP process id of socket listener process */ PROCESS rx_listenerPid = 0; /* LWP process id of socket listener process */
static int rx_ListenerProc(void *dummy); static void* rx_ListenerProc(void *dummy);
/* /*
* Delay the current thread the specified number of seconds. * Delay the current thread the specified number of seconds.
@ -119,14 +119,14 @@ rxi_InitializeThreadSupport(void)
} }
void void
rxi_StartServerProc(void (*proc) (void), int stacksize) rxi_StartServerProc(void *(*proc) (void *), int stacksize)
{ {
PROCESS scratchPid; PROCESS scratchPid;
static int number = 0; static int number = 0;
char name[32]; char name[32];
sprintf(name, "srv_%d", ++number); sprintf(name, "srv_%d", ++number);
LWP_CreateProcess((int (*)(void *))proc, stacksize, RX_PROCESS_PRIORITY, (void *)0, LWP_CreateProcess(proc, stacksize, RX_PROCESS_PRIORITY, NULL,
"rx_ServerProc", &scratchPid); "rx_ServerProc", &scratchPid);
if (registerProgram) if (registerProgram)
(*registerProgram) (scratchPid, name); (*registerProgram) (scratchPid, name);
@ -320,7 +320,7 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
/* This is the listener process request loop. The listener process loop /* This is the listener process request loop. The listener process loop
* becomes a server thread when rxi_ListenerProc returns, and stays * becomes a server thread when rxi_ListenerProc returns, and stays
* server thread until rxi_ServerProc returns. */ * server thread until rxi_ServerProc returns. */
static int static void *
rx_ListenerProc(void *dummy) rx_ListenerProc(void *dummy)
{ {
int threadID; int threadID;
@ -343,13 +343,14 @@ rx_ListenerProc(void *dummy)
/* assert(sock != OSI_NULLSOCKET); */ /* assert(sock != OSI_NULLSOCKET); */
} }
/* not reached */ /* not reached */
return NULL;
} }
/* This is the server process request loop. The server process loop /* This is the server process request loop. The server process loop
* becomes a listener thread when rxi_ServerProc returns, and stays * becomes a listener thread when rxi_ServerProc returns, and stays
* listener thread until rxi_ListenerProc returns. */ * listener thread until rxi_ListenerProc returns. */
void void *
rx_ServerProc(void) rx_ServerProc(void * unused)
{ {
osi_socket sock; osi_socket sock;
int threadID; int threadID;
@ -376,6 +377,7 @@ rx_ServerProc(void)
/* assert(newcall != NULL); */ /* assert(newcall != NULL); */
} }
/* not reached */ /* not reached */
return NULL;
} }
/* /*

View File

@ -365,7 +365,7 @@ extern osi_socket *rxk_NewSocket(short aport);
extern int rxk_ReadPacket(osi_socket so, struct rx_packet *p, int *host, extern int rxk_ReadPacket(osi_socket so, struct rx_packet *p, int *host,
int *port); int *port);
#ifdef UKERNEL #ifdef UKERNEL
extern void rx_ServerProc(void); extern void *rx_ServerProc(void *);
#endif #endif
extern void osi_AssertFailK(const char *expr, const char *file, int line); extern void osi_AssertFailK(const char *expr, const char *file, int line);
extern void rxk_ListenerProc(void); extern void rxk_ListenerProc(void);
@ -419,7 +419,6 @@ extern void afs_rxevent_daemon(void);
/* rx_lwp.c */ /* rx_lwp.c */
extern void rx_ServerProc(void);
extern void rxi_Sleep(void *addr); extern void rxi_Sleep(void *addr);
extern void rxi_Delay(int seconds); extern void rxi_Delay(int seconds);
extern void rxi_InitializeThreadSupport(void); extern void rxi_InitializeThreadSupport(void);
@ -429,9 +428,9 @@ extern void rxi_StopListener(void);
extern void rxi_ReScheduleEvents(void); extern void rxi_ReScheduleEvents(void);
#endif #endif
extern void rxi_InitializeThreadSupport(void); extern void rxi_InitializeThreadSupport(void);
extern void rxi_StartServerProc(void (*proc) (void), int stacksize); extern void rxi_StartServerProc(void *(*proc) (void *), int stacksize);
extern void rxi_StartListener(void); extern void rxi_StartListener(void);
extern void rx_ServerProc(void); extern void *rx_ServerProc(void *);
extern int rxi_Listen(osi_socket sock); extern int rxi_Listen(osi_socket sock);
extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags); extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags); extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
@ -531,11 +530,11 @@ extern int rxi_AdjustDgramPackets(int frags, int mtu);
/* rx_pthread.c */ /* rx_pthread.c */
extern void rxi_Delay(int sec); extern void rxi_Delay(int sec);
extern void rxi_InitializeThreadSupport(void); extern void rxi_InitializeThreadSupport(void);
extern void rxi_StartServerProc(void (*proc) (void), int stacksize); extern void rxi_StartServerProc(void *(*proc) (void *), int stacksize);
#ifndef rxi_ReScheduleEvents #ifndef rxi_ReScheduleEvents
extern void rxi_ReScheduleEvents(void); extern void rxi_ReScheduleEvents(void);
#endif #endif
extern void rx_ServerProc(void); extern void *rx_ServerProc(void *);
extern void rxi_StartListener(void); extern void rxi_StartListener(void);
extern int rxi_Listen(osi_socket sock); extern int rxi_Listen(osi_socket sock);
extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags); extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);

View File

@ -108,7 +108,7 @@ server_entry(void *argp)
* Start an Rx server process. * Start an Rx server process.
*/ */
void void
rxi_StartServerProc(void (*proc) (void), int stacksize) rxi_StartServerProc(void *(*proc) (void *), int stacksize)
{ {
pthread_t thread; pthread_t thread;
pthread_attr_t tattr; pthread_attr_t tattr;
@ -279,8 +279,8 @@ rx_ListenerProc(void *argp)
/* This is the server process request loop. The server process loop /* This is the server process request loop. The server process loop
* becomes a listener thread when rxi_ServerProc returns, and stays * becomes a listener thread when rxi_ServerProc returns, and stays
* listener thread until rxi_ListenerProc returns. */ * listener thread until rxi_ListenerProc returns. */
void void *
rx_ServerProc(void) rx_ServerProc(void * dummy)
{ {
osi_socket sock; osi_socket sock;
int threadID; int threadID;

View File

@ -305,7 +305,8 @@ ubeacon_InitServerListCommon(ame, info, clones, aservers)
* we're sync site or we want to be the sync site. It runs in its very own light-weight * we're sync site or we want to be the sync site. It runs in its very own light-weight
* process. * process.
*/ */
ubeacon_Interact() void *
ubeacon_Interact(void *dummy)
{ {
register afs_int32 code; register afs_int32 code;
struct timeval tt; struct timeval tt;

View File

@ -412,8 +412,8 @@ urecovery_Initialize(register struct ubik_dbase *adbase)
* requests. However, the recovery module still has one more task: * requests. However, the recovery module still has one more task:
* propagating the dbase out to everyone who is up in the network. * propagating the dbase out to everyone who is up in the network.
*/ */
int void *
urecovery_Interact(void) urecovery_Interact(void *dummy)
{ {
afs_int32 code, tcode; afs_int32 code, tcode;
struct ubik_server *bestServer = NULL; struct ubik_server *bestServer = NULL;

View File

@ -193,7 +193,6 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
struct rx_service *tservice; struct rx_service *tservice;
extern int VOTE_ExecuteRequest(), DISK_ExecuteRequest(); extern int VOTE_ExecuteRequest(), DISK_ExecuteRequest();
extern void rx_ServerProc();
extern int rx_stackSize; extern int rx_stackSize;
initialize_U_error_table(); initialize_U_error_table();

View File

@ -313,11 +313,11 @@ extern int urecovery_AllBetter(register struct ubik_dbase *adbase,
extern int urecovery_AbortAll(struct ubik_dbase *adbase); extern int urecovery_AbortAll(struct ubik_dbase *adbase);
extern int urecovery_CheckTid(register struct ubik_tid *atid); extern int urecovery_CheckTid(register struct ubik_tid *atid);
extern int urecovery_Initialize(register struct ubik_dbase *adbase); extern int urecovery_Initialize(register struct ubik_dbase *adbase);
extern int urecovery_Interact(void); extern void *urecovery_Interact(void *);
extern int DoProbe(struct ubik_server *server); extern int DoProbe(struct ubik_server *server);
extern int ubeacon_Interact(); extern void *ubeacon_Interact(void *);
extern int sdisk_Interact(); extern int sdisk_Interact();
extern int uvote_Interact(); extern int uvote_Interact();
extern int DISK_Abort(); extern int DISK_Abort();

View File

@ -41,6 +41,7 @@ RCSID
#include <sys/stat.h> #include <sys/stat.h>
#include "afsutil.h" #include "afsutil.h"
#include "fileutil.h" #include "fileutil.h"
#include <lwp.h>
#if defined(AFS_PTHREAD_ENV) #if defined(AFS_PTHREAD_ENV)
#include <assert.h> #include <assert.h>
#include <pthread.h> #include <pthread.h>
@ -165,9 +166,10 @@ FSLog(const char *format, ...)
va_end(args); va_end(args);
} /*FSLog */ } /*FSLog */
static int static void*
DebugOn(int loglevel) DebugOn(void *param)
{ {
int loglevel = (int)param;
if (loglevel == 0) { if (loglevel == 0) {
ViceLog(0, ("Reset Debug levels to 0\n")); ViceLog(0, ("Reset Debug levels to 0\n"));
} else { } else {
@ -181,8 +183,6 @@ DebugOn(int loglevel)
void void
SetDebug_Signal(int signo) SetDebug_Signal(int signo)
{ {
/* extern int IOMGR_SoftSig();*/
if (LogLevel > 0) { if (LogLevel > 0) {
LogLevel *= 5; LogLevel *= 5;
@ -202,9 +202,9 @@ SetDebug_Signal(int signo)
} }
printLocks = 2; printLocks = 2;
#if defined(AFS_PTHREAD_ENV) #if defined(AFS_PTHREAD_ENV)
DebugOn(LogLevel); DebugOn((void *) LogLevel);
#else /* AFS_PTHREAD_ENV */ #else /* AFS_PTHREAD_ENV */
IOMGR_SoftSig(DebugOn, LogLevel); IOMGR_SoftSig(DebugOn, (void *) LogLevel);
#endif /* AFS_PTHREAD_ENV */ #endif /* AFS_PTHREAD_ENV */
(void)signal(signo, SetDebug_Signal); /* on some platforms, this (void)signal(signo, SetDebug_Signal); /* on some platforms, this
@ -220,9 +220,9 @@ ResetDebug_Signal(int signo)
if (printLocks > 0) if (printLocks > 0)
--printLocks; --printLocks;
#if defined(AFS_PTHREAD_ENV) #if defined(AFS_PTHREAD_ENV)
DebugOn(LogLevel); DebugOn((void *) LogLevel);
#else /* AFS_PTHREAD_ENV */ #else /* AFS_PTHREAD_ENV */
IOMGR_SoftSig(DebugOn, LogLevel); IOMGR_SoftSig(DebugOn, (void *) LogLevel);
#endif /* AFS_PTHREAD_ENV */ #endif /* AFS_PTHREAD_ENV */
(void)signal(signo, ResetDebug_Signal); /* on some platforms, (void)signal(signo, ResetDebug_Signal); /* on some platforms,

View File

@ -224,7 +224,7 @@ extern int MultiBreakCallBackAlternateAddress_r(struct host *host,
struct AFSCBFids *afidp); struct AFSCBFids *afidp);
extern int DumpCallBackState(void); extern int DumpCallBackState(void);
extern int PrintCallBackStats(void); extern int PrintCallBackStats(void);
extern int ShutDown(void); extern void *ShutDown(void *);
extern void ShutDownAndCore(int dopanic); extern void ShutDownAndCore(int dopanic);
extern struct host *h_Alloc(register struct rx_connection *r_con); extern struct host *h_Alloc(register struct rx_connection *r_con);

View File

@ -111,10 +111,10 @@ extern int BreakVolumeCallBacksLater();
extern int LogLevel, etext; extern int LogLevel, etext;
extern afs_int32 BlocksSpare, PctSpare; extern afs_int32 BlocksSpare, PctSpare;
int ShutDown(void); void *ShutDown(void *);
static void ClearXStatValues(), NewParms(), PrintCounters(); static void ClearXStatValues(), NewParms(), PrintCounters();
static void ResetCheckDescriptors(void), ResetCheckSignal(void); static void ResetCheckDescriptors(void), ResetCheckSignal(void);
static int CheckSignal(void); static void *CheckSignal(void *);
extern int GetKeysFromToken(); extern int GetKeysFromToken();
extern int RXAFS_ExecuteRequest(); extern int RXAFS_ExecuteRequest();
extern int RXSTATS_ExecuteRequest(); extern int RXSTATS_ExecuteRequest();
@ -250,8 +250,8 @@ struct fs_state fs_state =
*/ */
/* DEBUG HACK */ /* DEBUG HACK */
static int static void *
CheckDescriptors() CheckDescriptors(void *unused)
{ {
#ifndef AFS_NT40_ENV #ifndef AFS_NT40_ENV
struct afs_stat status; struct afs_stat status;
@ -266,8 +266,8 @@ CheckDescriptors()
} }
fflush(stdout); fflush(stdout);
ResetCheckDescriptors(); ResetCheckDescriptors();
return 0;
#endif #endif
return 0;
} /*CheckDescriptors */ } /*CheckDescriptors */
@ -275,19 +275,19 @@ CheckDescriptors()
void void
CheckSignal_Signal(x) CheckSignal_Signal(x)
{ {
CheckSignal(); CheckSignal(NULL);
} }
void void
ShutDown_Signal(x) ShutDown_Signal(x)
{ {
ShutDown(); ShutDown(NULL);
} }
void void
CheckDescriptors_Signal(x) CheckDescriptors_Signal(x)
{ {
CheckDescriptors(); CheckDescriptors(NULL);
} }
#else /* AFS_PTHREAD_ENV */ #else /* AFS_PTHREAD_ENV */
void void
@ -442,8 +442,8 @@ setThreadId(char *s)
} }
/* This LWP does things roughly every 5 minutes */ /* This LWP does things roughly every 5 minutes */
static void static void *
FiveMinuteCheckLWP() FiveMinuteCheckLWP(void *unused)
{ {
static int msg = 0; static int msg = 0;
char tbuffer[32]; char tbuffer[32];
@ -511,6 +511,7 @@ FiveMinuteCheckLWP()
FS_UNLOCK; FS_UNLOCK;
FS_STATE_UNLOCK; FS_STATE_UNLOCK;
#endif #endif
return NULL;
} /*FiveMinuteCheckLWP */ } /*FiveMinuteCheckLWP */
@ -519,8 +520,8 @@ FiveMinuteCheckLWP()
* it probes the workstations * it probes the workstations
*/ */
static void static void *
HostCheckLWP() HostCheckLWP(void *unused)
{ {
ViceLog(1, ("Starting Host check process\n")); ViceLog(1, ("Starting Host check process\n"));
setThreadId("HostCheckLWP"); setThreadId("HostCheckLWP");
@ -562,14 +563,15 @@ HostCheckLWP()
FS_UNLOCK; FS_UNLOCK;
FS_STATE_UNLOCK; FS_STATE_UNLOCK;
#endif #endif
return NULL;
} /*HostCheckLWP */ } /*HostCheckLWP */
/* This LWP does fsync checks every 5 minutes: it should not be used for /* This LWP does fsync checks every 5 minutes: it should not be used for
* other 5 minute activities because it may be delayed by timeouts when * other 5 minute activities because it may be delayed by timeouts when
* it probes the workstations * it probes the workstations
*/ */
static void static void *
FsyncCheckLWP() FsyncCheckLWP(void *unused)
{ {
afs_int32 code; afs_int32 code;
#ifdef AFS_PTHREAD_ENV #ifdef AFS_PTHREAD_ENV
@ -628,6 +630,7 @@ FsyncCheckLWP()
FS_UNLOCK; FS_UNLOCK;
FS_STATE_UNLOCK; FS_STATE_UNLOCK;
#endif /* AFS_DEMAND_ATTACH_FS */ #endif /* AFS_DEMAND_ATTACH_FS */
return NULL;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
@ -747,8 +750,8 @@ PrintCounters()
static int static void *
CheckSignal() CheckSignal(void *unused)
{ {
if (FS_registered > 0) { if (FS_registered > 0) {
/* /*
@ -855,8 +858,8 @@ ShutDownAndCore(int dopanic)
exit(0); exit(0);
} }
int void *
ShutDown(void) ShutDown(void *unused)
{ /* backward compatibility */ { /* backward compatibility */
ShutDownAndCore(DONTPANIC); ShutDownAndCore(DONTPANIC);
return 0; return 0;
@ -2219,12 +2222,12 @@ main(int argc, char *argv[])
assert(pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) == 0); assert(pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) == 0);
assert(pthread_create assert(pthread_create
(&serverPid, &tattr, (void *)FiveMinuteCheckLWP, (&serverPid, &tattr, FiveMinuteCheckLWP,
&fiveminutes) == 0); &fiveminutes) == 0);
assert(pthread_create assert(pthread_create
(&serverPid, &tattr, (void *)HostCheckLWP, &fiveminutes) == 0); (&serverPid, &tattr, HostCheckLWP, &fiveminutes) == 0);
assert(pthread_create assert(pthread_create
(&serverPid, &tattr, (void *)FsyncCheckLWP, &fiveminutes) == 0); (&serverPid, &tattr, FsyncCheckLWP, &fiveminutes) == 0);
#else /* AFS_PTHREAD_ENV */ #else /* AFS_PTHREAD_ENV */
ViceLog(5, ("Starting LWP\n")); ViceLog(5, ("Starting LWP\n"));
assert(LWP_CreateProcess assert(LWP_CreateProcess

View File

@ -60,7 +60,7 @@ afs_uint32 HostAddress[MAXSERVERID + 1];
extern int afsconf_CheckAuth(); extern int afsconf_CheckAuth();
extern int afsconf_ServerAuth(); extern int afsconf_ServerAuth();
static CheckSignal(); static void *CheckSignal(void*);
int LogLevel = 0; int LogLevel = 0;
int smallMem = 0; int smallMem = 0;
int rxJumbograms = 1; /* default is to send and receive jumbo grams */ int rxJumbograms = 1; /* default is to send and receive jumbo grams */
@ -77,8 +77,8 @@ CheckSignal_Signal()
IOMGR_SoftSig(CheckSignal, 0); IOMGR_SoftSig(CheckSignal, 0);
} }
static static void *
CheckSignal() CheckSignal(void *unused)
{ {
register int i, errorcode; register int i, errorcode;
struct ubik_trans *trans; struct ubik_trans *trans;
@ -94,7 +94,7 @@ CheckSignal()
for (i = 0; i < HASHSIZE; i++) { for (i = 0; i < HASHSIZE; i++) {
HashIdDump(trans, i); HashIdDump(trans, i);
} }
return (ubik_EndTrans(trans)); return ((void *)ubik_EndTrans(trans));
} /*CheckSignal */ } /*CheckSignal */

View File

@ -142,8 +142,8 @@ TryUnlock()
} }
/* background daemon for timing out transactions */ /* background daemon for timing out transactions */
static void static void*
BKGLoop() BKGLoop(void *unused)
{ {
struct timeval tv; struct timeval tv;
int loop = 0; int loop = 0;
@ -164,12 +164,14 @@ BKGLoop()
ReOpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH); ReOpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
} }
} }
return NULL;
} }
/* Background daemon for sleeping so the volserver does not become I/O bound */ /* Background daemon for sleeping so the volserver does not become I/O bound */
afs_int32 TTsleep, TTrun; afs_int32 TTsleep, TTrun;
static void static void *
BKGSleep() BKGSleep(void *unused)
{ {
struct volser_trans *tt; struct volser_trans *tt;
@ -197,6 +199,7 @@ BKGSleep()
VTRANS_UNLOCK; VTRANS_UNLOCK;
} }
} }
return NULL;
} }
#ifndef AFS_NT40_ENV #ifndef AFS_NT40_ENV

View File

@ -198,8 +198,8 @@ xstat_cm_Cleanup(int a_releaseMem)
* Side Effects: * Side Effects:
* As advertised. * As advertised.
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
static void static void *
xstat_cm_LWP() xstat_cm_LWP(void *unused)
{ {
static char rn[] = "xstat_cm_LWP"; /*Routine name */ static char rn[] = "xstat_cm_LWP"; /*Routine name */
register afs_int32 code; /*Results of calls */ register afs_int32 code; /*Results of calls */
@ -349,6 +349,7 @@ xstat_cm_LWP()
code); code);
} /*Continuous execution */ } /*Continuous execution */
} /*Service loop */ } /*Service loop */
return NULL;
} }

View File

@ -238,8 +238,8 @@ xstat_fs_Cleanup(int a_releaseMem)
* Nothing interesting. * Nothing interesting.
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
static void static void *
xstat_fs_LWP() xstat_fs_LWP(void *unused)
{ {
static char rn[] = "xstat_fs_LWP"; /*Routine name */ static char rn[] = "xstat_fs_LWP"; /*Routine name */
register afs_int32 code; /*Results of calls */ register afs_int32 code; /*Results of calls */
@ -388,6 +388,7 @@ xstat_fs_LWP()
code); code);
} /*Continuous execution */ } /*Continuous execution */
} /*Service loop */ } /*Service loop */
return NULL;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------