diff --git a/src/lib/lwp/lwp.c b/src/lib/lwp/lwp.c index 5234d2ec..c575d9ec 100644 --- a/src/lib/lwp/lwp.c +++ b/src/lib/lwp/lwp.c @@ -35,7 +35,6 @@ #include #include -#include #include #include #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(); diff --git a/src/lib/lwp/lwpint.h b/src/lib/lwp/lwpint.h index e8895ca6..e686660b 100644 --- a/src/lib/lwp/lwpint.h +++ b/src/lib/lwp/lwpint.h @@ -41,11 +41,6 @@ #include #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