Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2017 04:06:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 214987] updating EVFILT_TIMER kqueue events doesn't work
Message-ID:  <bug-214987-8-tcSgpMgZ8r@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-214987-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-214987-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214987

--- Comment #3 from Conrad Meyer <cem@freebsd.org> ---
I see.  You are reusing the timer with ident=3D1.  Hm.  With:

@@ -25,7 +25,7 @@
     int n =3D ::kevent(kq, &event, 1, nullptr, 0, nullptr);
     assert(n =3D=3D 0);

-    EV_SET(&event, 1, EVFILT_TIMER, flags, fflags, 1000, nullptr);
+    EV_SET(&event, 2, EVFILT_TIMER, flags, fflags, 1000, nullptr);
     n =3D ::kevent(kq, &event, 1, nullptr, 0, nullptr);
     assert(n =3D=3D 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=20=20=
=20
kn:fffff800286c4e00
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530=20=20=
=20
kn:fffff800286c4e00 kc:fffff80005cb4200
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530=20=20=
=20
return:0
  1  15058                 filt_timer:entry 2017 Jan 11 20:06:00.530=20=20=
=20
kn:fffff800286c4e00 hint:0
  1  15059                filt_timer:return 2017 Jan 11 20:06:00.530=20=20=
=20
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=20=20=
=20
kn:fffff800286c4e80
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530=20=20=
=20
kn:fffff800286c4e80 kc:fffff80005cb4180
  1  15061          filt_timerattach:return 2017 Jan 11 20:06:00.530=20=20=
=20
return:0
  1  15058                 filt_timer:entry 2017 Jan 11 20:06:00.530=20=20=
=20
kn:fffff800286c4e80 hint:0
  1  15059                filt_timer:return 2017 Jan 11 20:06:00.530=20=20=
=20
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=20=20=
=20
kn:fffff800286c4e80
  1  15065          filt_timerexpire:return 2017 Jan 11 20:06:00.531=20=20=
=20
return:fffff80004224a00
  3  15062           filt_timerdetach:entry 2017 Jan 11 20:06:00.531=20=20=
=20
kn:fffff800286c4e80
  3  15063          filt_timerdetach:return 2017 Jan 11 20:06:00.531=20=20=
=20
return:2
  3  15062           filt_timerdetach:entry 2017 Jan 11 20:06:00.532=20=20=
=20
kn:fffff800286c4e00
  3  15063          filt_timerdetach:return 2017 Jan 11 20:06:00.532=20=20=
=20
return:1

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214987-8-tcSgpMgZ8r>