[Bug 214987] updating EVFILT_TIMER kqueue events doesn't work
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jan 12 04:06:59 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214987
--- Comment #3 from Conrad Meyer <cem at freebsd.org> ---
I see. You are reusing the timer with ident=1. Hm. With:
@@ -25,7 +25,7 @@
int n = ::kevent(kq, &event, 1, nullptr, 0, nullptr);
assert(n == 0);
- EV_SET(&event, 1, EVFILT_TIMER, flags, fflags, 1000, nullptr);
+ EV_SET(&event, 2, EVFILT_TIMER, flags, fflags, 1000, nullptr);
n = ::kevent(kq, &event, 1, nullptr, 0, nullptr);
assert(n == 0);
Two timers are attached, and the program indeed wakes up quickly:
CPU ID FUNCTION:NAME
1 64686 kevent:entry 2017 Jan 11 20:06:00.530
1 15060 filt_timerattach:entry 2017 Jan 11 20:06:00.530
kn:fffff800286c4e00
1 15061 filt_timerattach:return 2017 Jan 11 20:06:00.530
kn:fffff800286c4e00 kc:fffff80005cb4200
1 15061 filt_timerattach:return 2017 Jan 11 20:06:00.530
return:0
1 15058 filt_timer:entry 2017 Jan 11 20:06:00.530
kn:fffff800286c4e00 hint:0
1 15059 filt_timer:return 2017 Jan 11 20:06:00.530
return:0
1 64686 kevent:entry 2017 Jan 11 20:06:00.530
1 15060 filt_timerattach:entry 2017 Jan 11 20:06:00.530
kn:fffff800286c4e80
1 15061 filt_timerattach:return 2017 Jan 11 20:06:00.530
kn:fffff800286c4e80 kc:fffff80005cb4180
1 15061 filt_timerattach:return 2017 Jan 11 20:06:00.530
return:0
1 15058 filt_timer:entry 2017 Jan 11 20:06:00.530
kn:fffff800286c4e80 hint:0
1 15059 filt_timer:return 2017 Jan 11 20:06:00.530
return:0
1 64686 kevent:entry 2017 Jan 11 20:06:00.530
1 15064 filt_timerexpire:entry 2017 Jan 11 20:06:00.531
kn:fffff800286c4e80
1 15065 filt_timerexpire:return 2017 Jan 11 20:06:00.531
return:fffff80004224a00
3 15062 filt_timerdetach:entry 2017 Jan 11 20:06:00.531
kn:fffff800286c4e80
3 15063 filt_timerdetach:return 2017 Jan 11 20:06:00.531
return:2
3 15062 filt_timerdetach:entry 2017 Jan 11 20:06:00.532
kn:fffff800286c4e00
3 15063 filt_timerdetach:return 2017 Jan 11 20:06:00.532
return:1
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list