summaryrefslogtreecommitdiff
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2023-08-13 08:29:29 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2023-08-13 08:29:29 +0000
commit0fd75a66226d20b255e371aeb2f61d077776a60f (patch)
tree5c70cdafe7a948ef8fe939015f90cf121899117c /usr.bin/kdump
parent28e8306c08ef6ffecf74fe9178061c9993a882d0 (diff)
kevent: Add precision and abstimer flags for EVFILT_TIMER
Add timer precision flags NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS and NOTE_NSECONDS for EVFILT_TIMER. Also, add an initial implementation of NOTE_ABSTIME timers. Similar kevent(2) flags exist on FreeBSD, NetBSD and XNU. Initial diff by and OK aisha@ OK mpi@
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/mksubr25
1 files changed, 24 insertions, 1 deletions
diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr
index 6dd94c00a45..2762a0d97a2 100644
--- a/usr.bin/kdump/mksubr
+++ b/usr.bin/kdump/mksubr
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: mksubr,v 1.39 2022/12/19 22:55:12 guenther Exp $
+# $OpenBSD: mksubr,v 1.40 2023/08/13 08:29:28 visa Exp $
#
# Copyright (c) 2006 David Kirchner <dpk@dpk.net>
#
@@ -560,6 +560,29 @@ _EOF_
printf "\t\tif_print_or(fflags, %s, or);\n", $i }'
cat <<_EOF_
break;
+ case EVFILT_TIMER:
+#define NOTE_TIMER_UNITMASK \
+ (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS|NOTE_NSECONDS)
+ switch (fflags & NOTE_TIMER_UNITMASK) {
+ case NOTE_SECONDS:
+ printf("NOTE_SECONDS");
+ break;
+ case NOTE_MSECONDS:
+ printf("NOTE_MSECONDS");
+ break;
+ case NOTE_USECONDS:
+ printf("NOTE_USECONDS");
+ break;
+ case NOTE_NSECONDS:
+ printf("NOTE_NSECONDS");
+ break;
+ default:
+ printf("invalid");
+ break;
+ }
+ or = 1;
+ if_print_or(fflags, NOTE_ABSTIME, or);
+ break;
}
printf(">");
}