From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [PATCH 2/2] introduce uatomic_and and uatomic_or
Date: Fri, 12 Nov 2010 07:38:57 -0500 [thread overview]
Message-ID: <20101112123856.GA31489@Krystal> (raw)
In-Reply-To: <20101112123018.GB30826@Krystal>
* Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> * Paolo Bonzini (pbonzini at redhat.com) wrote:
> > On 11/12/2010 01:24 PM, Paolo Bonzini wrote:
> >> Should I rename uatomic_add to uatomic_xchg_add too (I prefer this name
> >> to uatomic_return_add)?
> >
> > Uh, uatomic_add returns void actually. Then returning void from
> > uatomic_{and,or} is indeed more consistent.
>
> Ah! I knew we'd find the culprit!! ;-)
BTW, I'd be fine with adding:
uatomic_and/uatomic_or (returning void)
But I wonder if, on any architecture, there is a significantly better
way to implement:
uatomic_xchg_add/uatomic_xchg_or (returning the old value)
other than using a cmpxchg() underneath ? If not, then creating this
extra primitive would be pretty much useless.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2010-11-12 12:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 8:57 [ltt-dev] [PATCH 0/2] Add uatomic_and and uatomic_or to uatomic library Paolo Bonzini
2010-11-12 8:57 ` [ltt-dev] [PATCH 1/2] use generic-size operations for common implementation of atomic ops Paolo Bonzini
2010-11-12 12:04 ` Mathieu Desnoyers
2010-11-12 8:57 ` [ltt-dev] [PATCH 2/2] introduce uatomic_and and uatomic_or Paolo Bonzini
2010-11-12 12:08 ` Mathieu Desnoyers
2010-11-12 12:13 ` Paolo Bonzini
2010-11-12 12:19 ` Mathieu Desnoyers
2010-11-12 12:24 ` Paolo Bonzini
2010-11-12 12:27 ` Paolo Bonzini
2010-11-12 12:30 ` Mathieu Desnoyers
2010-11-12 12:38 ` Mathieu Desnoyers [this message]
2010-11-12 14:39 ` Paolo Bonzini
2010-11-12 12:29 ` Mathieu Desnoyers
2010-11-12 14:39 ` Paolo Bonzini
2010-11-12 12:15 ` Mathieu Desnoyers
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=20101112123856.GA31489@Krystal \
--to=compudj@krystal.dyndns.org \
/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