Date: Fri, 23 Mar 2001 18:26:12 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Archie Cobbs <archie@dellroad.org> Cc: arch@FreeBSD.org Subject: Re: Critical Regions Round II Message-ID: <XFMail.010323182612.jhb@FreeBSD.org> In-Reply-To: <200103232027.f2NKRS928064@arch20m.dellroad.org>
index | next in thread | previous in thread | raw e-mail
On 23-Mar-01 Archie Cobbs wrote:
> John Baldwin writes:
>> Also, this entire API was forced out into MI code. After the discussion on
>> the mailing list I propose the following that will hopefully make everyone
>> happy:
>>
>> disable_intr() - x86 / ia64 only, just clears the IF or psr.i bit, and is
>> a MD function
>> enable_intr() - x86 / ia64 only, just sets the IF or psr.i bit, and is a
>> MD function
>
> Apologies in advance if I'm missing something obvious..
>
> Shouldn't these be, e.g.,
>
> i386_disable_intr(), i386_enable_intr()
>
> and
>
> ia64_enable_intr(), ia64_disable_intr()
>
> That is, it seems like "machine dependent" has a strict meaning,
> it means: specific to a single (one) architecture.
Sticking all MD stuff under a ${MACHINE_ARCH}_* namespace might be an
interesting project in the future, but it wouldn't be a small undertaking.
> Or are we expecting to have code that looks like this:
>
> #if defined(__i386__) || defined(__ia64__)
> disable_intr()
> #endif
>
> ??
No, this code should not be used outside of sys/${MACHINE_ARCH}, which is
mostly how things were (aside from broken things like the joy driver) before
SMPng.
--
John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010323182612.jhb>
