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

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

 



On Fri, Jul 10, 2015 at 02:42:56PM +0100, Russell King - ARM Linux wrote:
> The obvious question though is whether we have an established name for this
> operation elsewhere in the kernel, and whether we should have consistency.

Consistency is good.

> In include/linux, we already have (grepping for 'and_*not'):
> 
> include/linux/nodemask.h:#define nodes_andnot(dst, src1, src2) \
> include/linux/bitmap.h:extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
> include/linux/cpumask.h:static inline int cpumask_andnot(struct cpumask *dstp,
> 
> We also have:
> 
> include/linux/signal.h:#define _sig_andn(x,y)       ((x) & ~(y))
> 
> which seems to be the only instance of "andn" in include/.

How about I rename the _sig_andn one to _sig_andnot, and go with
atomic_andnot, to match the *mask functions.

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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