This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PATCH: Fix ll/sc for mips
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Hiroyuki Machida <machida at sm dot sony dot co dot jp>
- Cc: hjl at lucon dot org, libc-alpha at sources dot redhat dot com, linux-mips at oss dot sgi dot com
- Date: Fri, 1 Feb 2002 12:50:48 +0100 (MET)
- Subject: Re: PATCH: Fix ll/sc for mips
- Organization: Technical University of Gdansk
On Fri, 1 Feb 2002, Hiroyuki Machida wrote:
> > It will fail if *p is not same as oldval.
>
> Please note that "sc" may fail even if nobody write the
> variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See
> MIPS RUN" for more detail.)
> So, after your patch applied, compare_and_swap() may fail, even if
> *p is equal to oldval.
That's exactly what I meant -- "sc" may fail to execute the store, while
"cmpxchgl" may not.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +