From owner-freebsd-smp Sat Nov 18 9:34:39 2000 Delivered-To: freebsd-smp@freebsd.org Received: from io.yi.org (h24-69-199-88.gv.shawcable.net [24.69.199.88]) by hub.freebsd.org (Postfix) with ESMTP id B9EC537B479 for ; Sat, 18 Nov 2000 09:34:37 -0800 (PST) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id D3879BA7A; Sat, 18 Nov 2000 09:34:37 -0800 (PST) X-Mailer: exmh version 2.1.1 10/15/1999 To: Jonathan Lemon Cc: smp@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_timeout.c In-Reply-To: Message from Jonathan Lemon of "Sat, 18 Nov 2000 11:15:09 CST." <200011181715.eAIHF9367073@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 18 Nov 2000 09:34:37 -0800 From: Jake Burkholder Message-Id: <20001118173437.D3879BA7A@io.yi.org> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > In article you write: > >@@ -129,18 +132,22 @@ > > c->c_flags = > > (c->c_flags & ~CALLOUT_PENDING); > > } > >- mtx_exit(&sched_lock, MTX_SPIN); > >+ mtx_exit(&callout_lock, MTX_SPIN); > >+ if (!(c->c_flags & CALLOUT_MPSAFE)) > >+ mtx_enter(&Giant, MTX_DEF); > > splx(s); > > c_func(c_arg); > > s = splhigh(); > >- mtx_enter(&sched_lock, MTX_SPIN); > >+ if (!(c->c_flags & CALLOUT_MPSAFE)) > >+ mtx_exit(&Giant, MTX_DEF); > >+ mtx_enter(&callout_lock, MTX_SPIN); > > steps = 0; > > c = nextsoftcheck; > > You'll have to cache c->c_flags (in the same fashion as c_func/c_arg), > since the callout may be freed immediately prior to this bit of code. Right, thanks :) > -- > Jonathan > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message