Commit Graph

23 Commits

Author SHA1 Message Date
Gavin Atkinson
fed7e55027 Since r202933, kthread_suspend_check() takes no arguments. Update the
example to match.

MFC after:	3 days
2014-07-15 23:29:20 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
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
Julian Elischer
58cf5c84e0 Add claraifications to the kproc and kthread manpages and link
the kthread_create(9) man page to the kproc(9) page as it had migrated and
people looking for it may need a hand to find its new name.

MFC after:	1 week
2009-08-23 07:48:11 +00:00
Tom Rhodes
49b50876b6 Add ENOMEM to the return values.
Remove invalid return values.
Remove reference to non-existent manual pages.
Remove reference to rfork (it does not discuss RFSTOPPED).
Add sys/unistd.h to the list of includes (required for RFSTOPPED).

PR:		126227
Submitted by:	Mateusz Guzik <mjguzik@gmail.com> (based on, original version)
Reviewed by:	jhb, Christoph Mallon <christoph.mallon@gmx.de>
2009-01-27 00:22:16 +00:00
Julian Elischer
c59b9a7659 Document the kproc_kthread_add() call
and fix a small detail of its implementation.
MFC after: 1 week
2008-04-29 22:43:15 +00:00
Julian Elischer
39b920eb0c Doc police fixes
thanks to: ru@
2007-10-26 16:50:21 +00:00
Julian Elischer
4960b2adf0 catch up with the code. 2007-10-26 08:28:45 +00:00
Julian Elischer
cae927b25f Note the temporary removal of these functions. 2007-10-21 02:45:57 +00:00
Ruslan Ermilov
4f06896130 Assorted markup fixes and minor wordsmithing.
Approved by:	re
2005-06-15 13:31:23 +00:00
Joerg Wunsch
cf2acd69e3 Document that kthread_exit()ing will cause a wakeup(9) on the thread
handle.

MFC after:	1 week
2004-09-24 19:58:47 +00:00
Benno Rice
6771685b7a Update the documentation for kthread_create to include the pages argument.
Reviewed by:	sheldonh
Forgotten by:	scottl
2002-10-19 01:39:44 +00:00
Alfred Perlstein
9e9715e9c0 de-__P() 2002-10-10 00:32:55 +00:00
Mike Pritchard
b82af3f5e4 ispell sweep of share/man/man9/*. 2002-01-09 11:43:48 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov
5521ff5a4d mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
John Baldwin
29ef536da3 - Add 2001 to copyright.
- Kthread functions return an error status, they don't set errno to an
  error status.
- Remove the BUGS section as all the bugs listed have been fixed now.
2001-03-09 03:09:30 +00:00
Ruslan Ermilov
3136363f3e Prepare for mdoc(7)NG. 2000-12-29 09:18:45 +00:00
John Baldwin
aea5b8ffe1 Catch up to the changes to the kthread API. 2000-12-15 20:39:35 +00:00
John Baldwin
ab7e1991c0 Beef up the description of the kernel thread API.
Reviewed by:	sheldonh, jasone
2000-11-13 20:34:20 +00:00
Mike Pritchard
096ed6644a Typo fix. 2000-10-27 20:55:15 +00:00
Mark Murray
e5e600c900 Add some very crude man pages to try to induce folk to work on them.
Agreed to work on them:	jasone
2000-10-24 03:33:24 +00:00