mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
lib/find_bit: Introduce find_next_andnot_bit()
In preparation of introducing for_each_cpu_andnot(), add a variant of find_next_bit() that negate the bits in @addr2 when ANDing them with the bits in @addr1. Signed-off-by: Valentin Schneider <vschneid@redhat.com>
This commit is contained in:
committed by
Yury Norov
parent
78e5a33994
commit
90d482908e
@@ -164,6 +164,15 @@ unsigned long _find_next_and_bit(const unsigned long *addr1, const unsigned long
|
||||
EXPORT_SYMBOL(_find_next_and_bit);
|
||||
#endif
|
||||
|
||||
#ifndef find_next_andnot_bit
|
||||
unsigned long _find_next_andnot_bit(const unsigned long *addr1, const unsigned long *addr2,
|
||||
unsigned long nbits, unsigned long start)
|
||||
{
|
||||
return FIND_NEXT_BIT(addr1[idx] & ~addr2[idx], /* nop */, nbits, start);
|
||||
}
|
||||
EXPORT_SYMBOL(_find_next_andnot_bit);
|
||||
#endif
|
||||
|
||||
#ifndef find_next_zero_bit
|
||||
unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits,
|
||||
unsigned long start)
|
||||
|
Reference in New Issue
Block a user