From: "Li Yang" <LeoLi@freescale.com>
To: "Esben Nielsen" <nielsen.esben@gogglemail.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: atomic operations in user space
Date: Wed, 30 Aug 2006 01:00:35 +0800 [thread overview]
Message-ID: <a0bc9bf80608291000m5d444709h965a4b436724a937@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0608291804260.22067@frodo.shire>
On 8/30/06, Esben Nielsen <nielsen.esben@gogglemail.com> wrote:
>
>
> On Tue, 29 Aug 2006, Li Yang wrote:
>
> >> This is exactly how it is supposed to work! That's why there is a loop
> >> in the atomic increment - you check if you still had the reservation
> >> after the transaction by checking the result from the stwcx, and if not,
> >> retry.
> >
> > I surely know all the theories you mentioned clearly. But please do
> > look at the case I gave. Correct me if I missed anything. Thanks
> >
> > All the lwarx and stwcx operate on the same address.
> >
> >> Task A Task B
> >> lwarx
> > // Get RESERVATION
> >> ......
> >> lwarx
> >> stwcx
> >
> > // RESERVATION cleared
> >>
> >> .....
> >> .....
> >> lwarx
> >
> > // Get RESERVATION again
>
> Now we do a task switch involving atomic operations, and thus an
> reservation on another address.
>
This makes sense for me.
next prev parent reply other threads:[~2006-08-29 17:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 13:37 atomic operations in user space Li Yang
2006-08-29 16:05 ` Esben Nielsen
2006-08-29 17:00 ` Li Yang [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-30 2:17 Liu Dave-r63238
2006-08-30 2:27 ` Liu Dave-r63238
2006-08-30 2:40 ` Li Yang-r58472
2006-08-29 0:43 Xupei Liang
2006-08-29 6:43 ` Li Yang-r58472
2006-08-29 8:33 ` Esben Nielsen
2006-08-29 8:54 ` Li Yang-r58472
2006-08-29 9:20 ` Liu Dave-r63238
2006-08-29 9:56 ` Esben Nielsen
2006-08-29 10:05 ` Liu Dave-r63238
2006-08-29 10:52 ` Li Yang-r58472
2006-08-29 11:26 ` Esben Nielsen
2006-08-29 11:30 ` Esben Nielsen
2006-08-29 12:36 ` Brent Cook
2006-08-23 19:03 Terry Liang
2006-08-24 10:39 ` Li Yang-r58472
2006-08-24 14:18 ` Brent Cook
2006-08-25 2:33 ` Li Yang-r58472
2006-08-22 20:50 Xupei Liang
2006-08-22 22:23 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0bc9bf80608291000m5d444709h965a4b436724a937@mail.gmail.com \
--to=leoli@freescale.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=nielsen.esben@gogglemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).