From b22cc713d4a7104694d147083227d8a7be345da5 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sun, 26 Mar 2006 01:39:08 -0800 Subject: [PATCH] --- yaml --- r: 24160 b: refs/heads/master c: 176d8b0c2709e764d491e63a0c1b3a3e1459fcf8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-generic/bitops/ffz.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 trunk/include/asm-generic/bitops/ffz.h diff --git a/[refs] b/[refs] index 45cc2aee6e73..06830f14c53b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c1226a005ec400e966f4993dfcc0e99fd7baa6a1 +refs/heads/master: 176d8b0c2709e764d491e63a0c1b3a3e1459fcf8 diff --git a/trunk/include/asm-generic/bitops/ffz.h b/trunk/include/asm-generic/bitops/ffz.h new file mode 100644 index 000000000000..6744bd4cdf46 --- /dev/null +++ b/trunk/include/asm-generic/bitops/ffz.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FFZ_H_ +#define _ASM_GENERIC_BITOPS_FFZ_H_ + +/* + * ffz - find first zero in word. + * @word: The word to search + * + * Undefined if no zero exists, so code should check against ~0UL first. + */ +#define ffz(x) __ffs(~(x)) + +#endif /* _ASM_GENERIC_BITOPS_FFZ_H_ */