The ci_want_resched check and preempt() call had been removed from

userret() which resulted in no process preemption (and probably
contributed to the signal trap loop locking up the machine that was
recently fixed).  Put the check and preempt() call in the AST trap
handler to restore process preemption.
This commit is contained in:
mhitch 2009-02-25 19:56:49 +00:00
parent 928c35bfce
commit daf32f5010
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.118 2009/02/18 17:32:12 mhitch Exp $ */
/* $NetBSD: trap.c,v 1.119 2009/02/25 19:56:49 mhitch Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -33,7 +33,7 @@
/* All bugs are subject to removal without further notice */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2009/02/18 17:32:12 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.119 2009/02/25 19:56:49 mhitch Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -303,6 +303,8 @@ if(faultdebug)printf("trap accflt type %lx, code %lx, pc %lx, psl %lx\n",
case T_ASTFLT|T_USER:
mtpr(AST_NO,PR_ASTLVL);
trapsig = false;
if (curcpu()->ci_want_resched)
preempt();
break;
#ifdef DDB