aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-06-17 00:57:26 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-06-17 00:57:26 +0000
commit2b34e84335149a2d464c8e4b1334fb8f65a1fa8f (patch)
treed91d2c296ad043d944aa75f9d9a8635198860982 /contrib
parentf2eb97b2cded8209e6d0d35930507dcfcf5bc794 (diff)
downloadsrc-2b34e84335149a2d464c8e4b1334fb8f65a1fa8f.tar.gz
src-2b34e84335149a2d464c8e4b1334fb8f65a1fa8f.zip
Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which specifies that the data field contains absolute time to fire the event. To make this useful, data member of the struct kevent must be extended to 64bit. Using the opportunity, I also added ext members. This changes struct kevent almost to Apple struct kevent64, except I did not changed type of ident and udata, the later would cause serious API incompatibilities. The type of ident was kept uintptr_t since EVFILT_AIO returns a pointer in this field, and e.g. CHERI is sensitive to the type (discussed with brooks, jhb). Unlike Apple kevent64, symbol versioning allows us to claim ABI compatibility and still name the new syscall kevent(2). Compat shims are provided for both host native and compat32. Requested by: bapt Reviewed by: bapt, brooks, ngie (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D11025
Notes
Notes: svn path=/head/; revision=320043
Diffstat (limited to 'contrib')
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_proc1.c4
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_sig.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_proc1.c b/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
index 5f8c2a4948b2..947e6e317a0a 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
@@ -139,11 +139,7 @@ ATF_TC_BODY(proc1, tc)
printf(" NOTE_FORK");
}
if (event[0].fflags & NOTE_CHILD)
-#ifdef __FreeBSD__
- printf(" NOTE_CHILD, parent = %" PRIdPTR, event[0].data);
-#else
printf(" NOTE_CHILD, parent = %" PRId64, event[0].data);
-#endif
printf("\n");
}
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_sig.c b/contrib/netbsd-tests/kernel/kqueue/t_sig.c
index 12e3d6115586..ea707e9af9e2 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_sig.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_sig.c
@@ -127,11 +127,7 @@ ATF_TC_BODY(sig, tc)
if (n == 0)
continue;
-#ifdef __FreeBSD__
- (void)printf("sig: kevent flags: 0x%x, data: %" PRIdPTR " (# "
-#else
(void)printf("sig: kevent flags: 0x%x, data: %" PRId64 " (# "
-#endif
"times signal posted)\n", event[0].flags, event[0].data);
}