freebsd-skq/share
Attilio Rao a50e80dcdd - Fix the kthread_{suspend, resume, suspend_check}() locking.
In the current code, the locking is completely broken and may lead
  easilly to deadlocks. Fix it by using the proc_mtx, linked to the
  suspending thread, as lock for the operation.  Keep using the
  thread_lock for setting and reading the flag even if it is not entirely
  necessary (atomic ops may do it as well, but this way the code is more
  readable).
- Fix a deadlock within kthread_suspend().
  The suspender should not sleep on a different channel wrt the suspended
  thread, or, otherwise, the awaker should wakeup both. Uniform the
  interface to what the kproc_* counterparts do (sleeping on the same
  channel).
- Change the kthread_suspend_check() prototype.
  kthread_suspend_check() always assumes curthread and must only refer to
  it, so skip the thread pointer as it may be easilly mistaken.
  If curthread is not a kthread, the system will panic.

In collabouration with:	jhb
Tested by:		Giovanni Trematerra
			<giovanni dot trematerra at gmail dot com>
MFC:			2 weeks
2010-01-24 15:07:00 +00:00
..
colldef Add lv_LV, move lt_LT to common part 2009-09-03 16:53:11 +00:00
dict
doc Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd. 2010-01-22 23:19:48 +00:00
examples Include unistd.h for read(), write() and stdlib.h for exit(). 2010-01-18 23:13:22 +00:00
info
man - Fix the kthread_{suspend, resume, suspend_check}() locking. 2010-01-24 15:07:00 +00:00
me
misc Now that I'm free from mentorship, it's only fair to document who 2010-01-04 15:50:41 +00:00
mk Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible 2010-01-22 14:05:48 +00:00
mklocale Add lv_LV, move lt_LT to common part 2009-09-03 17:12:45 +00:00
monetdef Last character is a space for the international currency symbol. 2009-09-13 22:17:23 +00:00
msgdef Add lv_LV 2009-09-04 06:19:37 +00:00
numericdef Add lv_LV 2009-09-03 17:37:23 +00:00
security Remove stale references to utmp(5) and its corresponding filenames. 2010-01-21 17:25:12 +00:00
sendmail
skel Switch the default terminal emulation style to xterm for most platforms. 2009-11-13 05:54:55 +00:00
snmp
syscons Add various new keymaps: 2009-06-12 22:53:49 +00:00
tabset
termcap Properly make the end key work again for TERM=xterm. 2010-01-10 21:41:37 +00:00
timedef Since %b contains unit, %b is not suitable for c_fmt, now. Use %_m 2009-11-14 15:56:23 +00:00
zoneinfo MFV of tzdata2010a: 2010-01-18 23:34:23 +00:00
Makefile Whitespace nit 2008-10-08 13:20:02 +00:00
Makefile.inc