diff options
author | robert <robert@openbsd.org> | 2018-01-13 12:58:40 +0000 |
---|---|---|
committer | robert <robert@openbsd.org> | 2018-01-13 12:58:40 +0000 |
commit | 586ac5a17b495f9217afcad55bf601907d19d47c (patch) | |
tree | 80559eb12a1ae7a45699fbf24a41d31c40cea1c5 /sys/sys/event.h | |
parent | coordinate again: polishing (diff) | |
download | wireguard-openbsd-586ac5a17b495f9217afcad55bf601907d19d47c.tar.xz wireguard-openbsd-586ac5a17b495f9217afcad55bf601907d19d47c.zip |
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@
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r-- | sys/sys/event.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h index c3b2b285bfc..e29c1128975 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,4 +1,4 @@ -/* $OpenBSD: event.h,v 1.29 2017/12/21 21:04:38 millert Exp $ */ +/* $OpenBSD: event.h,v 1.30 2018/01/13 12:58:40 robert Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -38,8 +38,9 @@ #define EVFILT_PROC (-5) /* attached to struct process */ #define EVFILT_SIGNAL (-6) /* attached to struct process */ #define EVFILT_TIMER (-7) /* timers */ +#define EVFILT_DEVICE (-8) /* devices */ -#define EVFILT_SYSCOUNT 7 +#define EVFILT_SYSCOUNT 8 #define EV_SET(kevp_, a, b, c, d, e, f) do { \ struct kevent *kevp = (kevp_); \ @@ -111,6 +112,9 @@ struct kevent { #define NOTE_TRACKERR 0x00000002 /* could not track child */ #define NOTE_CHILD 0x00000004 /* am a child process */ +/* data/hint flags for EVFILT_DEVICE, shared with userspace */ +#define NOTE_CHANGE 0x00000001 /* device change event */ + /* * This is currently visible to userland to work around broken * programs which pull in <sys/proc.h> or <sys/selinfo.h>. |