fabient e0588db8d2 Clearing the flag when preempting will let the preempted thread run
too much time. This can finish in a scheduler deadlock with ping-pong
between two threads.

One sample of this is:
- device lapic (to have a preemption point on critical_exit())
- options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq)
- running a cpu intensive task (that does not enter the kernel)
- only one CPU on SMP or no SMP.

As requested by jhb@ 4BSD have received the same type of fix instead of
propagating the flag to the new thread.

Reviewed by:	jhb, jeff
MFC after:	1 month
2011-03-31 13:59:47 +00:00
..
2011-03-30 17:59:54 +00:00
2011-03-05 20:54:17 +00:00
2010-11-22 15:28:54 +00:00
2010-11-25 20:05:11 +00:00
2011-03-23 13:44:32 +00:00
2011-01-08 18:51:15 +00:00
2011-03-30 17:59:54 +00:00
2011-03-30 17:59:54 +00:00
2010-01-04 20:59:52 +00:00
2010-11-14 16:10:15 +00:00
2011-03-26 17:17:24 +00:00