(lwpReschedule): Remove code permitting SIGALRM to be catched safely,

because there's no handler for it.
(LCOUNT, oldmask): Remove.
(lwpEntryPoint): Don't initialize oldmask.  Should have been done in
lwpInitSystem() anyway.
This commit is contained in:
Markus Armbruster 2006-06-06 20:57:03 +00:00
parent 5df2ae0da7
commit 24b56b9365
2 changed files with 0 additions and 23 deletions

View file

@ -35,7 +35,6 @@
#include <config.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include "lwp.h"
@ -49,8 +48,6 @@ char **LwpContextPtr;
int LwpMaxpri = 0; /* maximum priority so far */
int LwpStackGrowsDown;
static sigset_t oldmask;
static void lwpStackCheckInit(struct lwpProc *newp);
static void lwpStackCheck(struct lwpProc *newp);
static void lwpStackCheckUsed(struct lwpProc *newp);
@ -71,21 +68,12 @@ growsdown(void *x)
void
lwpReschedule(void)
{
static int lcount = LCOUNT;
static struct lwpProc *nextp;
static int i;
static sigset_t tmask;
if (LwpCurrent && (LwpCurrent->flags & LWP_STACKCHECK)) {
lwpStackCheck(LwpCurrent);
}
if (!--lcount) {
int p = lwpSetPriority(LWP_MAX_PRIO - 1);
lcount = LCOUNT;
sigprocmask(SIG_SETMASK, &oldmask, &tmask);
sigprocmask(SIG_SETMASK, &tmask, &oldmask);
LwpCurrent->pri = p;
}
/* destroy dead threads */
lwpStatus(LwpCurrent, "Cleaning dead queue");
@ -132,13 +120,7 @@ lwpReschedule(void)
void
lwpEntryPoint(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGALRM);
sigprocmask(SIG_SETMASK, &set, &oldmask);
*LwpContextPtr = LwpCurrent->ud;
lwpStatus(LwpCurrent, "starting at entry point");
(*LwpCurrent->entry)(LwpCurrent->ud);
lwpExit();

View file

@ -41,11 +41,6 @@
#include <setjmp.h>
#endif /* !UCONTEXT */
/* `liveness' counter: check signals every `n' visits to the scheduler */
/* note: the lower this value, the more responsive the system but the */
/* more inefficient the context switch time */
#define LCOUNT -1
/* process control block. do *not* change the position of context */
struct lwpProc {
#ifdef UCONTEXT