freebsd-skq/share/man
will 5d3a27c743 Extend taskqueue(9) to enable per-taskqueue callbacks.
The scope of these callbacks is primarily to support actions that affect the
taskqueue's thread environments.  They are entirely optional, and
consequently are introduced as a new API: taskqueue_set_callback().

This interface allows the caller to specify that a taskqueue requires a
callback and optional context pointer for a given callback type.

The callback types included in this commit can be used to register a
constructor and destructor for thread-local storage using osd(9).  This
allows a particular taskqueue to define that its threads require a specific
type of TLS, without the need for a specially-orchestrated task-based
mechanism for startup and shutdown in order to accomplish it.

Two callback types are supported at this point:

- TASKQUEUE_CALLBACK_TYPE_INIT, called by every thread when it starts, prior
  to processing any tasks.
- TASKQUEUE_CALLBACK_TYPE_SHUTDOWN, called by every thread when it exits,
  after it has processed its last task but before the taskqueue is
  reclaimed.

While I'm here:

- Add two new macros, TQ_ASSERT_LOCKED and TQ_ASSERT_UNLOCKED, and use them
  in appropriate locations.
- Fix taskqueue.9 to mention taskqueue_start_threads(), which is a required
  interface for all consumers of taskqueue(9).

Reviewed by:	kib (all), eadler (taskqueue.9), brd (taskqueue.9)
Approved by:	ken (mentor)
Sponsored by:	Spectra Logic
MFC after:	1 month
2013-03-23 15:11:53 +00:00
..
man1 Add ATF to the build. This is may be a bit rought around the egdes, 2012-10-22 01:18:41 +00:00
man3 siginfo(3): Document TRAP_DTRACE signal code. 2012-09-14 22:12:04 +00:00
man4 Document NGM_NAT_LIBALIAS_INFO. 2013-03-21 13:02:43 +00:00
man5 Retire the mislabeled ENABLE_SUID_SSH knob. 2013-03-22 14:10:15 +00:00
man6
man7 Suggest using the https: protocol not the svn: protocol to retrieve the 2013-03-07 13:24:16 +00:00
man8 Fixes to man8 groff mandoc style, usage mistakes, or typos. 2012-05-24 02:24:03 +00:00
man9 Extend taskqueue(9) to enable per-taskqueue callbacks. 2013-03-23 15:11:53 +00:00
Makefile Add a new build option, MAN_UTILS. This option lets you control building 2010-05-19 23:56:26 +00:00