Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2004 13:38:07 -0700
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 58484 for review
Message-ID:  <4109602F.9080108@elischer.org>
In-Reply-To: <200407292035.i6TKZqh2054795@repoman.freebsd.org>
References:  <200407292035.i6TKZqh2054795@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


John Baldwin wrote:

>http://perforce.freebsd.org/chv.cgi?CH=58484
>
>Change 58484 by jhb@jhb_slimer on 2004/07/29 20:35:13
>
>	Try to optimize intr_disable/restore by avoiding cli/sti like the
>	plague.
>

shouldn't one of these tests be reversed?

>
>Affected files ...
>
>.. //depot/projects/smpng/sys/i386/include/cpufunc.h#28 edit
>
>Differences ...
>
>==== //depot/projects/smpng/sys/i386/include/cpufunc.h#28 (text+ko) ====
>
>@@ -611,14 +611,16 @@
> 	register_t eflags;
> 
> 	eflags = read_eflags();
>-	disable_intr();
>+	if (eflags & PSL_I)
>+		disable_intr();
> 	return (eflags);
> }
> 
> static __inline void
> intr_restore(register_t eflags)
> {
>-	write_eflags(eflags);
>+	if (eflags & PSL_I)
>+		enable_intr();
> }
> 
> #else /* !(__GNUC__ || __INTEL_COMPILER) */
>  
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4109602F.9080108>