Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/kern Pull up following revision(s) (requested by chri...



details:   https://anonhg.NetBSD.org/src/rev/34d2c142876f
branches:  netbsd-8
changeset: 434568:34d2c142876f
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jan 16 13:26:12 2018 +0000

description:
Pull up following revision(s) (requested by christos in ticket #501):
        sys/kern/kern_event.c: revision 1.103
Set EV_ONESHOT to prevent rescheduling
XXX: pullup-8

diffstat:

 sys/kern/kern_event.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r f02bf656b7c1 -r 34d2c142876f sys/kern/kern_event.c
--- a/sys/kern/kern_event.c     Tue Jan 16 13:09:59 2018 +0000
+++ b/sys/kern/kern_event.c     Tue Jan 16 13:26:12 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_event.c,v 1.91.2.1 2017/07/05 20:04:40 snj Exp $  */
+/*     $NetBSD: kern_event.c,v 1.91.2.2 2018/01/16 13:26:12 martin Exp $       */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.91.2.1 2017/07/05 20:04:40 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.91.2.2 2018/01/16 13:26:12 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -662,6 +662,12 @@
 filt_timerdetach(struct knote *kn)
 {
        callout_t *calloutp;
+       struct kqueue *kq = kn->kn_kq;
+
+       mutex_spin_enter(&kq->kq_lock);
+       /* prevent rescheduling when we expire */
+       kn->kn_flags |= EV_ONESHOT;
+       mutex_spin_exit(&kq->kq_lock);
 
        calloutp = (callout_t *)kn->kn_hook;
        callout_halt(calloutp, NULL);



Home | Main Index | Thread Index | Old Index