Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/kqueue.2
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 30, 2021 | .Dd October 12, 2021 | ||||
.Dt KQUEUE 2 | .Dt KQUEUE 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm kqueue , | .Nm kqueue , | ||||
.Nm kevent | .Nm kevent | ||||
.Nd kernel event notification mechanism | .Nd kernel event notification mechanism | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 337 Lines • ▼ Show 20 Lines | |||||
For sockets, pipes | For sockets, pipes | ||||
and fifos, | and fifos, | ||||
.Va data | .Va data | ||||
will contain the amount of space remaining in the write buffer. | will contain the amount of space remaining in the write buffer. | ||||
The filter will set | The filter will set | ||||
.Dv EV_EOF | .Dv EV_EOF | ||||
when the reader disconnects, and for the fifo case, this will be cleared | when the reader disconnects, and for the fifo case, this will be cleared | ||||
when a new reader connects. | when a new reader connects. | ||||
Note that this filter is not supported for vnodes or BPF devices. | Note that this filter is not supported for vnodes. | ||||
.Pp | .Pp | ||||
For sockets, the low water mark and socket error handling is | For sockets, the low water mark and socket error handling is | ||||
identical to the | identical to the | ||||
.Dv EVFILT_READ | .Dv EVFILT_READ | ||||
case. | case. | ||||
.Pp | .Pp | ||||
For eventfds, | For eventfds, | ||||
.Va data | .Va data | ||||
will contain the maximum value that can be added to the counter | will contain the maximum value that can be added to the counter | ||||
without blocking. | without blocking. | ||||
.Pp | |||||
For BPF devices, the filter always indicates that it is possible to | |||||
write and | |||||
.Va data | |||||
will contain the MTU size of the underlying interface. | |||||
.It Dv EVFILT_EMPTY | .It Dv EVFILT_EMPTY | ||||
Takes a descriptor as the identifier, and returns whenever | Takes a descriptor as the identifier, and returns whenever | ||||
there is no remaining data in the write buffer. | there is no remaining data in the write buffer. | ||||
.It Dv EVFILT_AIO | .It Dv EVFILT_AIO | ||||
Events for this filter are not registered with | Events for this filter are not registered with | ||||
.Fn kevent | .Fn kevent | ||||
directly but are registered via the | directly but are registered via the | ||||
.Va aio_sigevent | .Va aio_sigevent | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |