]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - Documentation/atomic_ops.txt
docs: ramdisk/initrd/initramfs corrections
[karo-tx-linux.git] / Documentation / atomic_ops.txt
index 2a63d5662a93a1fd2e0889bc6aab93c1ae987102..938f99957052461c552d4b9a4bb0c5d4042bbfaa 100644 (file)
@@ -14,6 +14,10 @@ suffice:
 
        typedef struct { volatile int counter; } atomic_t;
 
+local_t is very similar to atomic_t. If the counter is per CPU and only
+updated by one CPU, local_t is probably more appropriate. Please see
+Documentation/local_ops.txt for the semantics of local_t.
+
        The first operations to implement for atomic_t's are the
 initializers and plain reads.
 
@@ -149,7 +153,7 @@ defined which accomplish this:
        void smp_mb__before_atomic_dec(void);
        void smp_mb__after_atomic_dec(void);
        void smp_mb__before_atomic_inc(void);
-       void smp_mb__after_atomic_dec(void);
+       void smp_mb__after_atomic_inc(void);
 
 For example, smp_mb__before_atomic_dec() can be used like so: