Deleted Added
full compact
1c1
< .\" Copyright 2004 John-Mark Gurney
---
> .\" Copyright 2006 John-Mark Gurney
25c25
< .\" $FreeBSD: head/share/man/man9/kqueue.9 163014 2006-10-04 20:17:14Z jmg $
---
> .\" $FreeBSD: head/share/man/man9/kqueue.9 163025 2006-10-05 08:42:07Z ru $
31,42c31,35
< .Nm kqueue_add_filteropts , kqueue_del_filteropts
< .Nd "add and remove kqueue event filters"
< .Pp
< .Nm kqfd_register
< .Nd "register a kevent with kqueue by fd"
< .Pp
< .Nm knote_fdclose
< .Nd "deactivate all knotes associated with fd"
< .Pp
< .Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty , knlist_init , knlist_destroy , knlist_clear , knlist_delete
< .Nd "initalize and manipulate lists of knotes"
< .Pp
---
> .Nm kqueue_add_filteropts , kqueue_del_filteropts ,
> .Nm kqfd_register ,
> .Nm knote_fdclose ,
> .Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty ,
> .Nm knlist_init , knlist_destroy , knlist_clear , knlist_delete ,
44c37
< .Nd "activate knotes on a knlist"
---
> .Nd "event delivery subsystem"
48c41
< .Fn kqueue_add_filteropts "int filt" "struct filterops *"
---
> .Fn kqueue_add_filteropts "int filt" "struct filterops *filtops"
52c45
< .Fn kqfd_register "int fd" "struct kevent *" "struct thread *" "int waitok"
---
> .Fn kqfd_register "int fd" "struct kevent *kev" "struct thread *td" "int waitok"
54c47
< .Fn knote_fdclose "struct thread *" "int fd"
---
> .Fn knote_fdclose "struct thread *td" "int fd"
56c49
< .Fn knlist_add "struct knlist *" "struct knote *" "int islocked"
---
> .Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked"
58c51
< .Fn knlist_remove "struct knlist *" "struct knote *" "int islocked"
---
> .Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked"
60c53
< .Fn knlist_remove_inevent "struct knlist *" "struct knote *"
---
> .Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn"
62c55
< .Fn knlist_empty "struct knlist *"
---
> .Fn knlist_empty "struct knlist *knl"
64c57,63
< .Fn knlist_init "struct knlist *" "void *lock" "void (*kl_lock)(void *)" "void (*kl_unlock)(void *) "int (*kl_locked)(void *)"
---
> .Fo knlist_init
> .Fa "struct knlist *knl"
> .Fa "void *lock"
> .Fa "void \*[lp]*kl_lock\*[rp]\*[lp]void *\*[rp]"
> .Fa "void \*[lp]*kl_unlock\*[rp]\*[lp]void *\*[rp]"
> .Fa "int \*[lp]*kl_locked\*[rp]\*[lp]void *\*[rp]"
> .Fc
66c65
< .Fn knlist_destroy "struct knlist *"
---
> .Fn knlist_destroy "struct knlist *knl"
68c67
< .Fn knlist_clear "struct knlist *" "int islocked"
---
> .Fn knlist_clear "struct knlist *knl" "int islocked"
70c69
< .Fn knlist_delete "struct knlist *" "struct thread *" "int islocked"
---
> .Fn knlist_delete "struct knlist *knl" "struct thread *td" "int islocked"
72c71
< .Fn KNOTE_LOCKED "struct knlist *" "long hint"
---
> .Fn KNOTE_LOCKED "struct knlist *knl" "long hint"
74c73
< .Fn KNOTE_UNLOCKED "struct knlist *" "long hint"
---
> .Fn KNOTE_UNLOCKED "struct knlist *knl" "long hint"
80,81c79,80
< allows the addition and removal of a filter type.
< The filter is staticly defined by the
---
> allow for the addition and removal of a filter type.
> The filter is statically defined by the
86c85,88
< will make filt available. The
---
> will make
> .Fa filt
> available.
> The
98c100,102
< In this case, the knote passed into
---
> In this case, the
> .Vt knote
> passed into
102c106
< member initalized to the
---
> member initialized to the
104c108
< that represense the file descriptor.
---
> that represents the file descriptor.
108c112
< member will be called when attaching a
---
> function will be called when attaching a
115c119
< to the list that was initalized with
---
> to the list that was initialized with
119c123,125
< is only necesary if the object can have multiple knotes associated with it.
---
> is only necessary if the object can have multiple
> .Vt knotes
> associated with it.
131,134c137,140
< .Va knote .
< The function shall return 0 on success, or appropriate errno for the failure.
< Durning
< .Va f_attach
---
> .Vt knote .
> The function shall return 0 on success, or appropriate error for the failure.
> During
> .Va f_attach ,
142c148,149
< members called when processing the knote.
---
> functions called when processing the
> .Vt knote .
146c153
< member will be called to detach the
---
> function will be called to detach the
155c162
< meber will be called to update the status of the
---
> function will be called to update the status of the
159,161c166,173
< The hint field will be 0 when called scanning knotes to see which
< are available.
< Otherwise the hint field will be populated with the value passed to
---
> The
> .Fa hint
> argument will be 0 when scanning
> .Vt knotes
> to see which are triggered.
> Otherwise, the
> .Fa hint
> argument will be the value passed to either
176,177c188,189
< member will not be called and the
< .Va knote
---
> function will not be called and the
> .Vt knote
187c199,201
< If it is safe to sleep, waitok should be set.
---
> If it is safe to sleep,
> .Fa waitok
> should be set.
195c209
< Once returned there will no longer be any
---
> Once returned, there will no longer be any
208c222
< must be held over the call to
---
> lock must be held over the call to
214c228,230
< family of functions are for managing knotes associated with an object.
---
> family of functions are for managing
> .Vt knotes
> associated with an object.
216c232
< .Va knlist
---
> .Vt knlist
220c236
< must be initalized with the
---
> must be initialized with the
232c248
< will be used to manipulate
---
> functions will be used to manipulate a
236c252
< a default routine operating on
---
> default routines operating on
241c257
< structure may be embeded in your object structure.
---
> structure may be embedded into the object structure.
245c261
< .Fn f_event .
---
> .Va f_event .
251c267
< requires that
---
> requires that a
256c272,274
< is used to remove all knotes associated with the list.
---
> is used to remove all
> .Vt knotes
> associated with the list.
259c277
< argument declares if you have the
---
> argument declares if
261c279
< has been aquired.
---
> has been acquired.
269c287
< The function
---
> The
271c289,290
< is to be used at object destruction time.
---
> function is used to destroy a
> .Vt knlist .
276,279c295,297
< .Fn ( knlist_clear
< be called before or
< .Fn knlist_empty
< returns true) and no more
---
> .Fn ( knlist_empty
> returns true)
> and no more
281c299,303
< are able to be attached to the object.
---
> may be attached to the object.
> A
> .Vt knlist
> may be emptied by calling
> .Fn knlist_clear .
283,284c305
< .Pp
< The functions
---
> The macros
288,289c309
< are used to notify knotes about events associated with your object.
< It will iterated over all
---
> are used to notify
290a311,313
> about events associated with the object.
> It will iterate over all
> .Vt knotes
295c318
< The function
---
> The macro
302,303c325,326
< will aquire the lock before iterating over the list of
< .Ft knotes .
---
> will acquire the lock before iterating over the list of
> .Vt knotes .
310c333
< .Fa filt
---
> .Fa filt ,
320c343
< .Fa filt
---
> .Fa filt ,
329c352
< if the file descriptor is not a kqueue or any of the possible values returned
---
> if the file descriptor is not a kqueue, or any of the possible values returned
331c354
< .Xr kevent .
---
> .Xr kevent 2 .
333,334c356,357
< .Xr kqueue 2 ,
< .Xr kevent 2
---
> .Xr kevent 2 ,
> .Xr kqueue 2