[Top] [All Lists]

Re: Once again: test_and_set for CPUs w/o LL/SC

To: Johannes Stezenbach <>
Subject: Re: Once again: test_and_set for CPUs w/o LL/SC
From: "Maciej W. Rozycki" <>
Date: Tue, 15 Oct 2002 17:36:29 +0200 (MET DST)
Cc: "Kevin D. Kissell" <>,
In-reply-to: <>
Organization: Technical University of Gdansk
Original-recipient: rfc822;
On Mon, 7 Oct 2002, Johannes Stezenbach wrote:

> The question is how the glibc can detect if
> a) the CPU does not have LL/SC
> b) the kernel guarantees k1 != MAGIC

 Well, since the relevant code will mostly be inlined, you don't really
need either as you can't select an alternative anyway.  The relevant
variant will be selected at the build time as it's already being done for
the ll/sc and sysmips() variants.  You may consider marking binaries as
using your approach so that the kernel refuses to run them if unsupported,
but for MIPS it isn't performed for any functionality so far, so you'd
have to study how other ports do that and which way is most suitable. 

> I also want to know if there's public interest to get such
> a change in the kernel. If yes, I will try to get a matching
> patch into glibc. If no, I will just post the current patch I
> use to the list for the hackers to pick up.

 Well, the kernel changes should be trivial, with no performance impact if
written carefully, so they might get included even if only a few people
are interested.  Send a proposal.

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>