[Top] [All Lists]

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

To: Johannes Stezenbach <>, "Kevin D. Kissell" <>,
Subject: Re: Once again: test_and_set for CPUs w/o LL/SC
From: Daniel Jacobowitz <>
Date: Mon, 7 Oct 2002 14:51:36 -0400
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <01fd01c26e1d$add77240$10eca8c0@grendel> <>
User-agent: Mutt/1.5.1i
On Mon, Oct 07, 2002 at 08:43:44PM +0200, 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
> I think the kernel should announce this explicitly.
> In my patch from Sep 16 I used a sysctl, but that's
> probably bad because glibc would rely on a real new
> include/linux/sysctl.h.
> I need some advice on this (maybe add a line to /proc/cpuinfo,
> or create a new /proc entry? or add a sysmips call to get
> this info?).

You should be using an "aux vector"; see how PowerPC provides current
glibc with the size of a cache line.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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