blob: 53e631e1d76da7858839a9aa92d47bff9603c9c2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Ingo Molnar408894e2006-01-09 15:59:20 -08002/*
3 * Mutexes: blocking mutual exclusion locks
4 *
5 * started by Ingo Molnar:
6 *
7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
8 *
9 * This file contains mutex debugging related internal declarations,
10 * prototypes and inline functions, for the CONFIG_DEBUG_MUTEXES case.
11 * More details are in kernel/mutex-debug.c.
12 */
13
Ingo Molnar408894e2006-01-09 15:59:20 -080014/*
15 * This must be called with lock->wait_lock held.
16 */
Ingo Molnar9a11b49a2006-07-03 00:24:33 -070017extern void debug_mutex_lock_common(struct mutex *lock,
18 struct mutex_waiter *waiter);
Ingo Molnar408894e2006-01-09 15:59:20 -080019extern void debug_mutex_wake_waiter(struct mutex *lock,
20 struct mutex_waiter *waiter);
21extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);
22extern void debug_mutex_add_waiter(struct mutex *lock,
23 struct mutex_waiter *waiter,
Linus Torvalds6720a302016-06-23 12:11:17 -070024 struct task_struct *task);
Zqiang3a010c42021-05-17 11:40:05 +080025extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
Linus Torvalds6720a302016-06-23 12:11:17 -070026 struct task_struct *task);
Ingo Molnar408894e2006-01-09 15:59:20 -080027extern void debug_mutex_unlock(struct mutex *lock);
Ingo Molnar9a11b49a2006-07-03 00:24:33 -070028extern void debug_mutex_init(struct mutex *lock, const char *name,
29 struct lock_class_key *key);