2 .\" Copyright (C) 2002 Chad David <davidc@acns.ab.ca>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice(s), this list of conditions and the following disclaimer as
9 .\" the first lines of this file unmodified other than the possible
10 .\" addition of one or more copyright notices.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice(s), this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
16 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
19 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
35 .Nd "record and wakeup select requests"
40 .Fn selrecord "struct thread *td" "struct selinfo *sip"
42 .Fn selwakeup "struct selinfo *sip"
47 are the two central functions used by
50 and the objects that are being selected on.
51 They handle the task of recording which threads are waiting on which objects
52 and the waking of the proper threads when an event of interest occurs on an
56 records that the calling thread is interested in events related to a given
58 If another thread is already waiting on the object a collision will be flagged
61 which will be later dealt with by
69 is called by the underlying object handling code in order to notify any waiting
70 threads that an event of interest has occurred.
71 If a collision has occurred,
75 and broadcast on the global cv in order to wake all waiting threads so that
77 If the thread waiting on the object is not currently sleeping or the wait
83 flag which should be noted by
91 must be zeroed, such as by softc initialization, before any call to
95 otherwise a panic may occur.
99 and may acquire and release
106 This manual page was written by
107 .An Chad David Aq davidc@FreeBSD.org
109 .An Alfred Perlstein Aq alfred@FreeBSD.org .