/* Minimum stack size */
int lwp_MinStackSize=0;
-static lwp_remove(p, q)
+static int lwp_remove(p, q)
register PROCESS p;
register struct QUEUE *q;
{
if (q->head == p) q -> head = p -> next;
q->count--;
p -> next = p -> prev = NULL;
+ return 0;
}
-static insert(p, q)
+static int insert(p, q)
register PROCESS p;
register struct QUEUE *q;
{
p -> next = q -> head;
}
q->count++;
+ return 0;
}
-static move(p, from, to)
+static int move(p, from, to)
PROCESS p;
struct QUEUE *from, *to;
{
lwp_remove(p, from);
insert(p, to);
-
+ return 0;
}
/* Iterator macro */
}
#ifdef DEBUG
-Dump_Processes()
+int Dump_Processes()
{
if (lwp_init) {
register int i;
for_all_elts(x, blocked, { Dump_One_Process(x); })
} else
printf("***LWP: LWP support not initialized\n");
+ return 0;
}
#endif
Exit_LWP();
else
savecontext(Exit_LWP, &tempcontext, LWPANCHOR.outersp);
+ return;
}
static int Create_Process_Part2 () /* creates a context for the new process */
savecontext(Dispatcher, &temp->context, NULL);
(*temp->ep)(temp->parm);
LWP_DestroyProcess(temp);
+ return 0;
}
-static Delete_PCB(pid) /* remove a PCB from the process list */
+static int Delete_PCB(pid) /* remove a PCB from the process list */
register PROCESS pid;
{
Debug(4, ("Entered Delete_PCB"))
? &blocked
: &runnable[pid->priority]));
LWPANCHOR.processcnt--;
+ return 0;
}
#ifdef DEBUG
-static Dump_One_Process(pid)
+static int Dump_One_Process(pid)
PROCESS pid;
{
int i;
}
if (pid->wakevent>0)
printf("***LWP: Number of last wakeup event: %d\n", pid->wakevent);
+ return 0;
}
#endif
-static purge_dead_pcbs()
+static int purge_dead_pcbs()
{
for_all_elts(cur, blocked, { if (cur->status == DESTROYED) Dispose_of_Dead_PCB(cur); })
+ return 0;
}
int LWP_TraceProcesses = 0;
-static Dispatcher() /* Lightweight process dispatcher */
+static int Dispatcher() /* Lightweight process dispatcher */
{
register int i;
#ifdef DEBUG
*/
}
-static Exit_LWP()
+static int Exit_LWP()
{
abort();
}
#else
*(afs_int32 *)stackptr = STACKMAGIC;
#endif
+ return 0;
}
static int Stack_Used(stackptr, stacksize)
extern int IOMGR_Cancel(PROCESS pid);
extern int IOMGR_Initialize(void);
extern void IOMGR_FreeFDSet(fd_set * fds);
-static void SignalTimeout(int code, struct timeval *timeout);
+extern int IOMGR_SoftSig( int (*aproc)(), char *arock);
+
/* fasttime.c */
extern int FT_GetTimeOfDay(struct timeval *tv, struct timezone *tz);
#include <stdio.h>
#include <assert.h>
#include "lwp.h"
+#include <afsconfig.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
extern int PRE_Block; /* used in lwp.c and process.s */
static char (*EP)();
static int rc;
static jmp_buf_type *jmpBuffer;
-static int code;
-savecontext(ep, savearea, sp)
+afs_int32 savecontext(ep, savearea, sp)
char (*ep)();
struct lwp_context *savearea;
char* sp;
perror("Error in setjmp2 : restoring\n");
exit(3);
}
+ return 0;
}
-returnto(savearea)
+afs_int32 returnto(savearea)
struct lwp_context *savearea;
{
#if defined(DEBUG)
#endif
PRE_Block = 0;
longjmp(savearea->setjmp_buffer, 2);
+ return 0;
}