Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a2142b0 authored by Grant Grundler's avatar Grant Grundler Committed by Linus Torvalds
Browse files

atomic_ops.txt: mention local_t



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: default avatarGrant Grundler <grundler@parisc-linux.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 74beb9db
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,10 @@ suffice:


	typedef struct { volatile int counter; } atomic_t;
	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
	The first operations to implement for atomic_t's are the
initializers and plain reads.
initializers and plain reads.