linux-mips
[Top] [All Lists]

Re: PATCH: Always use ll/sc for mips

To: "H. J. Lu" <hjl@lucon.org>
Subject: Re: PATCH: Always use ll/sc for mips
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Wed, 17 Jul 2002 10:31:13 +0200 (MET DST)
Cc: Ulrich Drepper <drepper@redhat.com>, linux-mips@oss.sgi.com, GNU C Library <libc-alpha@sources.redhat.com>
In-reply-to: <20020716084208.A21699@lucon.org>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Tue, 16 Jul 2002, H. J. Lu wrote:

> >  It sucks performance-wise with no visible gain, so I don't think it is
> > really desireable.  Since the no-ll/sc case is handled correctly, I see no
> 
> Only <sys/tas.h> is covered by the kernel interface. But it doesn't
> cover atomicity.h in glibc and libstdc++.

 Even if nobody bothered fixing these, that doesn't mean some other code
is useless.  If you don't want to implement these with _test_and_set(),
then just put equivalent ll/sc code there, which will work thanks to the
emulation.  Depending on the operation it may even be faster than
_test_and_set() as ll/sc provides a generic way to perform atomic
operations, while using _test_and_set() might require a spinlock. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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