kqueue.9 (867099fa10ec5cb8a004ceac8d512a30912e3a04) kqueue.9 (b25711e6b07b69a7fd04931923aa56beb7168184)
1.\" Copyright 2006,2011 John-Mark Gurney
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
1.\" Copyright 2006,2011 John-Mark Gurney
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd February 25, 2012
27.Dd March 26, 2012
28.Dt KQUEUE 9
29.Os
30.Sh NAME
31.Nm kqueue_add_filteropts , kqueue_del_filteropts ,
32.Nm kqfd_register ,
33.Nm knote_fdclose ,
28.Dt KQUEUE 9
29.Os
30.Sh NAME
31.Nm kqueue_add_filteropts , kqueue_del_filteropts ,
32.Nm kqfd_register ,
33.Nm knote_fdclose ,
34.Nm knlist_init , knlist_init_mtx ,
34.Nm knlist_init , knlist_init_mtx , knlist_init_rw_reader ,
35.Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty ,
36.Nm knlist_clear , knlist_delete , knlist_destroy ,
37.Nm KNOTE_LOCKED , KNOTE_UNLOCKED
38.Nd "event delivery subsystem"
39.Sh SYNOPSIS
40.In sys/event.h
41.Ft int
42.Fn kqueue_add_filteropts "int filt" "struct filterops *filtops"

--- 9 unchanged lines hidden (view full) ---

52.Fa "void *lock"
53.Fa "void \*[lp]*kl_lock\*[rp]\*[lp]void *\*[rp]"
54.Fa "void \*[lp]*kl_unlock\*[rp]\*[lp]void *\*[rp]"
55.Fa "int \*[lp]*kl_locked\*[rp]\*[lp]void *\*[rp]"
56.Fc
57.Ft void
58.Fn knlist_init_mtx "struct knlist *knl" "struct mtx *lock"
59.Ft void
35.Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty ,
36.Nm knlist_clear , knlist_delete , knlist_destroy ,
37.Nm KNOTE_LOCKED , KNOTE_UNLOCKED
38.Nd "event delivery subsystem"
39.Sh SYNOPSIS
40.In sys/event.h
41.Ft int
42.Fn kqueue_add_filteropts "int filt" "struct filterops *filtops"

--- 9 unchanged lines hidden (view full) ---

52.Fa "void *lock"
53.Fa "void \*[lp]*kl_lock\*[rp]\*[lp]void *\*[rp]"
54.Fa "void \*[lp]*kl_unlock\*[rp]\*[lp]void *\*[rp]"
55.Fa "int \*[lp]*kl_locked\*[rp]\*[lp]void *\*[rp]"
56.Fc
57.Ft void
58.Fn knlist_init_mtx "struct knlist *knl" "struct mtx *lock"
59.Ft void
60.Fn knlist_init_rw_reader "struct knlist *knl" "struct rwlock *lock"
61.Ft void
60.Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked"
61.Ft void
62.Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked"
63.Ft void
64.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn"
65.Ft int
66.Fn knlist_empty "struct knlist *knl"
67.Ft void

--- 186 unchanged lines hidden (view full) ---

254associated with an object.
255A
256.Vt knlist
257is not required, but is commonly used.
258If used, the
259.Vt knlist
260must be initialized with either
261.Fn knlist_init
62.Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked"
63.Ft void
64.Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked"
65.Ft void
66.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn"
67.Ft int
68.Fn knlist_empty "struct knlist *knl"
69.Ft void

--- 186 unchanged lines hidden (view full) ---

256associated with an object.
257A
258.Vt knlist
259is not required, but is commonly used.
260If used, the
261.Vt knlist
262must be initialized with either
263.Fn knlist_init
264,
265.Fn knlist_init_mtx
262or
266or
263.Fn knlist_init_mtx .
267.Fn knlist_init_rw_reader .
264The
265.Vt knlist
266structure may be embedded into the object structure.
267The
268.Fa lock
269will be held over
270.Va f_event
271calls.

--- 28 unchanged lines hidden (view full) ---

300.Fa lock
301is a
302.Dv MTX_DEF
303style
304.Xr mutex 9
305lock.
306.Pp
307The function
268The
269.Vt knlist
270structure may be embedded into the object structure.
271The
272.Fa lock
273will be held over
274.Va f_event
275calls.

--- 28 unchanged lines hidden (view full) ---

304.Fa lock
305is a
306.Dv MTX_DEF
307style
308.Xr mutex 9
309lock.
310.Pp
311The function
312.Fn knlist_init_rw_reader
313may be used to initialize a
314.Vt knlist
315when
316.Fa lock
317is a
318.Xr rwlock 9
319read lock.
320Lock is acquired via
321.Fn rw_rlock
322function.
323.Pp
324The function
308.Fn knlist_empty
309returns true when there are no
310.Vt knotes
311on the list.
312The function requires that the
313.Fa lock
314be held when called.
315.Pp

--- 135 unchanged lines hidden ---
325.Fn knlist_empty
326returns true when there are no
327.Vt knotes
328on the list.
329The function requires that the
330.Fa lock
331be held when called.
332.Pp

--- 135 unchanged lines hidden ---