patch-2.4.0-test12 linux/Documentation/DocBook/kernel-hacking.tmpl

Next file: linux/Documentation/DocBook/videobook.tmpl
Previous file: linux/Documentation/DMA-mapping.txt
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/Documentation/DocBook/kernel-hacking.tmpl linux/Documentation/DocBook/kernel-hacking.tmpl
@@ -846,7 +846,7 @@
    first class of operations work on <type>atomic_t</type>
 
    <filename class=headerfile>include/asm/atomic.h</filename>; this
-   contains a signed integer (at least 32 bits long), and you must use
+   contains a signed integer (at least 24 bits long), and you must use
    these functions to manipulate or read atomic_t variables.
    <function>atomic_read()</function> and
    <function>atomic_set()</function> get and set the counter,
@@ -870,8 +870,8 @@
   </para>
 
   <para>
-   The second class of atomic operations is atomic bit operations,
-   defined in
+   The second class of atomic operations is atomic bit operations on a
+   <type>long</type>, defined in
 
    <filename class=headerfile>include/asm/bitops.h</filename>.  These
    operations generally take a pointer to the bit pattern, and a bit
@@ -887,8 +887,14 @@
   
   <para>
    It is possible to call these operations with bit indices greater
-   than 31.  The resulting behavior is strange on big-endian
+   than BITS_PER_LONG.  The resulting behavior is strange on big-endian
    platforms though so it is a good idea not to do this.
+  </para>
+
+  <para>
+   Note that the order of bits depends on the architecture, and in
+   particular, the bitfield passed to these operations must be at
+   least as large as a <type>long</type>.
   </para>
  </chapter>
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)