From f958d3d6837664f827b0ef126bb3a161c06a5d47 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 6 Dec 2005 00:12:34 +0000 Subject: [PATCH] (lwpReschedule): Fix the previous revision. --- src/lib/lwp/lwp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/lwp/lwp.c b/src/lib/lwp/lwp.c index 23d35ef8..6c88a79e 100644 --- a/src/lib/lwp/lwp.c +++ b/src/lib/lwp/lwp.c @@ -110,7 +110,8 @@ lwpReschedule(void) if (LwpCurrent) lwpStatus(LwpCurrent, "switch out"); /* do context switch */ - if (LwpCurrent != nextp && !(LwpCurrent && lwpSave(LwpCurrent->context))) { + i = LwpCurrent && lwpSave(LwpCurrent->context); + if (LwpCurrent != nextp && !i) { /* restore previous context */ lwpStatus(nextp, "switch in %d", nextp->pri); LwpCurrent = nextp;