Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ingo Molnar | 408894e | 2006-01-09 15:59:20 -0800 | [diff] [blame] | 2 | /* |
| 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 Molnar | 408894e | 2006-01-09 15:59:20 -0800 | [diff] [blame] | 14 | /* |
| 15 | * This must be called with lock->wait_lock held. |
| 16 | */ |
Ingo Molnar | 9a11b49a | 2006-07-03 00:24:33 -0700 | [diff] [blame] | 17 | extern void debug_mutex_lock_common(struct mutex *lock, |
| 18 | struct mutex_waiter *waiter); |
Ingo Molnar | 408894e | 2006-01-09 15:59:20 -0800 | [diff] [blame] | 19 | extern void debug_mutex_wake_waiter(struct mutex *lock, |
| 20 | struct mutex_waiter *waiter); |
| 21 | extern void debug_mutex_free_waiter(struct mutex_waiter *waiter); |
| 22 | extern void debug_mutex_add_waiter(struct mutex *lock, |
| 23 | struct mutex_waiter *waiter, |
Linus Torvalds | 6720a30 | 2016-06-23 12:11:17 -0700 | [diff] [blame] | 24 | struct task_struct *task); |
Zqiang | 3a010c4 | 2021-05-17 11:40:05 +0800 | [diff] [blame] | 25 | extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
Linus Torvalds | 6720a30 | 2016-06-23 12:11:17 -0700 | [diff] [blame] | 26 | struct task_struct *task); |
Ingo Molnar | 408894e | 2006-01-09 15:59:20 -0800 | [diff] [blame] | 27 | extern void debug_mutex_unlock(struct mutex *lock); |
Ingo Molnar | 9a11b49a | 2006-07-03 00:24:33 -0700 | [diff] [blame] | 28 | extern void debug_mutex_init(struct mutex *lock, const char *name, |
| 29 | struct lock_class_key *key); |