Skip to content

Commit

Permalink
atomic_ops.txt: mention local_t
Browse files Browse the repository at this point in the history
local_t is a variant of atomic_t and has related ops to match.
Add reference for local_t documentation to atomic_ops.txt.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Grant Grundler authored and Linus Torvalds committed Oct 17, 2007
1 parent 74beb9d commit 1a2142b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/atomic_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 1a2142b

Please sign in to comment.