Date: Sat, 18 Nov 2000 11:15:09 -0600 (CST) From: Jonathan Lemon <jlemon@flugsvamp.com> To: jburkhol@home.com, smp@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_timeout.c Message-ID: <200011181715.eAIHF9367073@prism.flugsvamp.com> In-Reply-To: <local.mail.freebsd-smp/20001118025912.158D4BA7A@io.yi.org> References: <local.mail.freebsd-smp/jhb@FreeBSD.ORG>
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. -- Jonathan 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?200011181715.eAIHF9367073>