Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1181413 > unrolled thread

Re: [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask definitions

Started byVineet Gupta <Vineet.Gupta1@synopsys.com>
First post2015-07-10 11:20 +0200
Last post2015-07-10 11:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask  definitions Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-10 11:20 +0200

#1181413 — Re: [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask definitions

FromVineet Gupta <Vineet.Gupta1@synopsys.com>
Date2015-07-10 11:20 +0200
SubjectRe: [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask definitions
Message-ID<pKCDo-44s-21@gated-at.bofh.it>
On Friday 10 July 2015 02:40 PM, Geert Uytterhoeven wrote:
> Hi Peter,
>
> On Thu, Jul 9, 2015 at 7:29 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > --- a/include/linux/atomic.h
>> > +++ b/include/linux/atomic.h
>> > @@ -28,6 +28,23 @@ static inline int atomic_add_unless(atom
>> >  #define atomic_inc_not_zero(v)         atomic_add_unless((v), 1, 0)
>> >  #endif
>> >
>> > +#ifndef atomic_nand
>> > +static inline void atomic_nand(int i, atomic_t *v)
>> > +{
>> > +       atomic_and(~i, v);
> That sounds like a misnomer...
>
> Your NAND is "A & ~B", while my[*] NAND is "~(A & B)"?
>
> [*] https://en.wikipedia.org/wiki/NAND_logic
>
> What about atomic_clear()? (Is atomic_bic() too ARM-centric?)
>

ARM + ARC centric :-)

We have the BIC instruction as well which does the same: A & ~B

-Vineet
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web