Date: Sat, 18 Nov 2000 09:34:37 -0800 From: Jake Burkholder <jburkhol@home.com> To: Jonathan Lemon <jlemon@flugsvamp.com> Cc: smp@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_timeout.c Message-ID: <20001118173437.D3879BA7A@io.yi.org> In-Reply-To: Message from Jonathan Lemon <jlemon@flugsvamp.com> of "Sat, 18 Nov 2000 11:15:09 CST." <200011181715.eAIHF9367073@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> In article <local.mail.freebsd-smp/20001118025912.158D4BA7A@io.yi.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001118173437.D3879BA7A>