From a6c5637f7626800961acb3367c954b98c84ff216 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sat, 13 Jan 2018 12:58:41 +0000 Subject: introduce a filter called EVFILT_DEVICE that can be used to notify listeners of device state changes. currently only supports NOTE_CHANGE that will be used by drm(4) ok kettenis@ --- lib/libc/sys/kqueue.2 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 7dbd3a55c9b..41fbc23db6f 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: kqueue.2,v 1.35 2017/07/10 06:38:07 dlg Exp $ +.\" $OpenBSD: kqueue.2,v 1.36 2018/01/13 12:58:40 robert Exp $ .\" .\" Copyright (c) 2000 Jonathan Lemon .\" All rights reserved. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.18 2001/02/14 08:48:35 guido Exp $ .\" -.Dd $Mdocdate: July 10 2017 $ +.Dd $Mdocdate: January 13 2018 $ .Dt KQUEUE 2 .Os .Sh NAME @@ -451,6 +451,19 @@ contains the number of times the timeout has expired since the last call to This filter automatically sets the .Dv EV_CLEAR flag internally. +.It Dv EVFILT_DEVICE +Takes a descriptor as the identifier, and the events to watch for in +.Va fflags , +and returns when one or more of the reuqested events occur on the +descriptor. The events to monitor are: +.Bl -tag -width XXNOTE_CHANGE +.It Dv NOTE_CHANGE +A device change event has occured, e.g. an HDMI cable has been plugged in to a port. +.El +.Pp +On return, +.Va fflags +contains the events which triggered the filter. .El .Sh RETURN VALUES .Fn kqueue -- cgit v1.2.3