Thread (7 messages) 7 messages, 6 authors, 2002-02-01

Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips

From: Hiroyuki Machida <hidden>
Date: 2002-02-01 05:59:23

Possibly related (same subject, not in this thread)

From: Kaz Kylheku <redacted>
Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips
Date: Thu, 31 Jan 2002 20:02:25 -0800 (PST)
On Fri, 1 Feb 2002, Hiroyuki Machida wrote:
quoted
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.
I can't think of anything that will break because of this, as long
as the compare_and_swap eventually succeeds on some subsequent trial.
If the atomic operation has to abort for some reason other than *p being
unequal to oldval, that should be cool.
I mean that this patch breaks the spec of compare_and_swap().

In most case, this patch may works as Kaz said. If this patch have
no side-effect to any application, it's ok to apply the patch. But
we can't know how to use compare_and_swap() in all aplications in a
whole world. So we have to follow the spec.  


---
Hiroyuki Machida
Sony Corp.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help