Commit 7c223098 authored by David Laight's avatar David Laight Committed by Linus Torvalds
Browse files

locking/osq_lock: Move the definition of optimistic_spin_node into osq_lock.c



struct optimistic_spin_node is private to the implementation.
Move it into the C file to ensure nothing is accessing it.

Signed-off-by: default avatarDavid Laight <david.laight@aculab.com>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f016f754
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -6,11 +6,6 @@
 * An MCS like lock especially tailored for optimistic spinning for sleeping
 * lock implementations (mutex, rwsem, etc).
 */
struct optimistic_spin_node {
	struct optimistic_spin_node *next, *prev;
	int locked; /* 1 if lock acquired */
	int cpu; /* encoded CPU # + 1 value */
};

struct optimistic_spin_queue {
	/*
+7 −0
Original line number Diff line number Diff line
@@ -11,6 +11,13 @@
 * called from interrupt context and we have preemption disabled while
 * spinning.
 */

struct optimistic_spin_node {
	struct optimistic_spin_node *next, *prev;
	int locked; /* 1 if lock acquired */
	int cpu; /* encoded CPU # + 1 value */
};

static DEFINE_PER_CPU_SHARED_ALIGNED(struct optimistic_spin_node, osq_node);

/*