From owner-freebsd-smp Sat Nov 18 9:15:32 2000 Delivered-To: freebsd-smp@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id CF58D37B479 for ; Sat, 18 Nov 2000 09:15:27 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id eAIHF9367073; Sat, 18 Nov 2000 11:15:09 -0600 (CST) (envelope-from jlemon) Date: Sat, 18 Nov 2000 11:15:09 -0600 (CST) From: Jonathan Lemon Message-Id: <200011181715.eAIHF9367073@prism.flugsvamp.com> To: jburkhol@home.com, smp@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_timeout.c X-Newsgroups: local.mail.freebsd-smp In-Reply-To: References: Organization: Cc: 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. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message