Commit 4f1893ec authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

locking/ww_mutex: Move the ww_mutex definitions from <linux/mutex.h> into <linux/ww_mutex.h>



Move the ww_mutex definitions into the ww_mutex specific header where they
belong.

Preparatory change to allow compiling ww_mutexes standalone.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211304.110216293@linutronix.de
parent 43d2d52d
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -20,9 +20,6 @@
#include <linux/osq_lock.h>
#include <linux/debug_locks.h>

struct ww_class;
struct ww_acquire_ctx;

/*
 * Simple, straightforward mutexes with strict semantics:
 *
@@ -66,14 +63,6 @@ struct mutex {
#endif
};

struct ww_mutex {
	struct mutex base;
	struct ww_acquire_ctx *ctx;
#ifdef CONFIG_DEBUG_MUTEXES
	struct ww_class *ww_class;
#endif
};

#ifdef CONFIG_DEBUG_MUTEXES

#define __DEBUG_MUTEX_INITIALIZER(lockname)				\
+8 −0
Original line number Diff line number Diff line
@@ -28,6 +28,14 @@ struct ww_class {
	unsigned int is_wait_die;
};

struct ww_mutex {
	struct mutex base;
	struct ww_acquire_ctx *ctx;
#ifdef CONFIG_DEBUG_MUTEXES
	struct ww_class *ww_class;
#endif
};

struct ww_acquire_ctx {
	struct task_struct *task;
	unsigned long stamp;