Re: [PATCH 03/20] arch,arc: Fold atomic_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 09, 2014 at 09:34:51AM +0000, Vineet Gupta wrote:
> Hi Peter,
> 
> Minor point below, otherwise looks good.
> 
> > +#define atomic_clear_mask(mask, v) atomic_and(~(mask), (v))
> 
> Given that ARC has instruction to do just that, can we keep below instead.
> 
> ATOMIC_OP(clear_mask, ~=, bic)
> 
> (see asm version of atomic_clear_mask)

Ah, yes I did notices that.

The thing is, I was going to kill clear_mask in the next set.

I'm going to introduce: atomic_{or,and,xor}() and replace all
atomic_set_mask() with atomic_or() and atomic_clear_mask() with
atomic_and(~(mask)).

One of the 'problems' is that atomic_{set,clear}_mask() are not
available on all archs and its a 'weird' interface in so far as that
most our other primitives are or/and based, I don't think we have nand.

But if people really want I suppose I could also add atomic_nand().

Attachment: pgp0LpZE_oQ5D.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux