Konstantin Belousov 07a9368a48 Do some refactoring and minor cleanups of the thread_single() code in
preparation for the global stop commit.

Move the code to weed suspended or sleeping threads into the
appropriate state, into the helper weed_inhib().  Current code already
has deep nesting and hard to follow [1].

Add currently useless helper remain_for_mode(), which returns the
count of threads which are allowed to run, according to the
single-threading mode.

In thread_single_end(), do not save curthread into local variable, it
is unused after, except to find curproc.

Remove stray empty line.

Requested by:	avg [1]
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-12-08 16:27:43 +00:00
..
2014-12-08 06:04:42 +00:00
2014-11-28 04:07:06 +00:00
2014-10-12 18:01:52 +00:00
2014-12-08 10:49:23 +00:00
2014-09-25 19:10:32 +00:00
2014-11-23 12:01:52 +00:00
2014-09-23 06:32:19 +00:00