summaryrefslogtreecommitdiffstats
path: root/include/asm-i386/bitops.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
committer <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
commit90ecc248e200fee448001248dde0ca540dd3ef64 (patch)
treea3fe89494ce63b4835f0f9cf5c45e74cde88252b /include/asm-i386/bitops.h
parent1513ff9b7899ab588401c89db0e99903dbf5f886 (diff)
Import of Linux/MIPS 1.1.68
Diffstat (limited to 'include/asm-i386/bitops.h')
-rw-r--r--include/asm-i386/bitops.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index ee339bd64..36b0bedc0 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -132,4 +132,18 @@ extern inline unsigned long ffz(unsigned long word)
return word;
}
+/*
+ * ffoz = Find First One in word and set to Zero. Undefined if no one exists,
+ * so code should check against 0UL first..
+ */
+extern inline unsigned long ffzc(unsigned long word)
+{
+ __asm__("bsf %2,%1\n\t"
+ "btrl %1,%0"
+ : "=m" (current->signal),"=r" (signr)
+ : "1" (signr));
+
+ return word;
+}
+
#endif /* _I386_BITOPS_H */