Skip to content

Commit

Permalink
[PATCH] x86_64: Correct wrong comment in local.h
Browse files Browse the repository at this point in the history
local_t is actually a win over atomic_t because it does not need lock
prefixes.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Apr 16, 2005
1 parent 72e76be commit 1c17340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-x86_64/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ static __inline__ void local_sub(unsigned long i, local_t *v)
:"ir" (i), "m" (v->counter));
}

/* On x86, these are no better than the atomic variants. */
/* On x86-64 these are better than the atomic variants on SMP kernels
because they dont use a lock prefix. */
#define __local_inc(l) local_inc(l)
#define __local_dec(l) local_dec(l)
#define __local_add(i,l) local_add((i),(l))
Expand Down

0 comments on commit 1c17340

Please sign in to comment.