1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Bit Operations</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="libc.html" title="Chapter 2. Basic C Library Functions"><link rel="prev" href="API-memchr-inv.html" title="memchr_inv"><link rel="next" href="API-set-bit.html" title="set_bit"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bit Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-memchr-inv.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Basic C Library Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-set-bit.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1123077812"></a>Bit Operations</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-set-bit.html"><span class="phrase">set_bit</span></a></span><span class="refpurpose"> — 2 Atomically set a bit in memory 3 </span></dt><dt><span class="refentrytitle"><a href="API---set-bit.html"><span class="phrase">__set_bit</span></a></span><span class="refpurpose"> — 4 Set a bit in memory 5 </span></dt><dt><span class="refentrytitle"><a href="API-clear-bit.html"><span class="phrase">clear_bit</span></a></span><span class="refpurpose"> — 6 Clears a bit in memory 7 </span></dt><dt><span class="refentrytitle"><a href="API---change-bit.html"><span class="phrase">__change_bit</span></a></span><span class="refpurpose"> — 8 Toggle a bit in memory 9 </span></dt><dt><span class="refentrytitle"><a href="API-change-bit.html"><span class="phrase">change_bit</span></a></span><span class="refpurpose"> — 10 Toggle a bit in memory 11 </span></dt><dt><span class="refentrytitle"><a href="API-test-and-set-bit.html"><span class="phrase">test_and_set_bit</span></a></span><span class="refpurpose"> — 12 Set a bit and return its old value 13 </span></dt><dt><span class="refentrytitle"><a href="API-test-and-set-bit-lock.html"><span class="phrase">test_and_set_bit_lock</span></a></span><span class="refpurpose"> — 14 Set a bit and return its old value for lock 15 </span></dt><dt><span class="refentrytitle"><a href="API---test-and-set-bit.html"><span class="phrase">__test_and_set_bit</span></a></span><span class="refpurpose"> — 16 Set a bit and return its old value 17 </span></dt><dt><span class="refentrytitle"><a href="API-test-and-clear-bit.html"><span class="phrase">test_and_clear_bit</span></a></span><span class="refpurpose"> — 18 Clear a bit and return its old value 19 </span></dt><dt><span class="refentrytitle"><a href="API---test-and-clear-bit.html"><span class="phrase">__test_and_clear_bit</span></a></span><span class="refpurpose"> — 20 Clear a bit and return its old value 21 </span></dt><dt><span class="refentrytitle"><a href="API-test-and-change-bit.html"><span class="phrase">test_and_change_bit</span></a></span><span class="refpurpose"> — 22 Change a bit and return its old value 23 </span></dt><dt><span class="refentrytitle"><a href="API-test-bit.html"><span class="phrase">test_bit</span></a></span><span class="refpurpose"> — 24 Determine whether a bit is set 25 </span></dt><dt><span class="refentrytitle"><a href="API---ffs.html"><span class="phrase">__ffs</span></a></span><span class="refpurpose"> — 26 find first set bit in word 27 </span></dt><dt><span class="refentrytitle"><a href="API-ffz.html"><span class="phrase">ffz</span></a></span><span class="refpurpose"> — 28 find first zero bit in word 29 </span></dt><dt><span class="refentrytitle"><a href="API-ffs.html"><span class="phrase">ffs</span></a></span><span class="refpurpose"> — 30 find first set bit in word 31 </span></dt><dt><span class="refentrytitle"><a href="API-fls.html"><span class="phrase">fls</span></a></span><span class="refpurpose"> — 32 find last set bit in word 33 </span></dt><dt><span class="refentrytitle"><a href="API-fls64.html"><span class="phrase">fls64</span></a></span><span class="refpurpose"> — 34 find last set bit in a 64-bit word 35 </span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-memchr-inv.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="libc.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-set-bit.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">memchr_inv</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">set_bit</span></td></tr></table></div></body></html> 36