Merge tag 'wireless-next-2023-11-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / include / linux / rcu_notifier.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Read-Copy Update notifiers, initially RCU CPU stall notifier.
4  * Separate from rcupdate.h to avoid #include loops.
5  *
6  * Copyright (C) 2023 Paul E. McKenney.
7  */
8
9 #ifndef __LINUX_RCU_NOTIFIER_H
10 #define __LINUX_RCU_NOTIFIER_H
11
12 // Actions for RCU CPU stall notifier calls.
13 #define RCU_STALL_NOTIFY_NORM   1
14 #define RCU_STALL_NOTIFY_EXP    2
15
16 #ifdef CONFIG_RCU_STALL_COMMON
17
18 #include <linux/notifier.h>
19 #include <linux/types.h>
20
21 int rcu_stall_chain_notifier_register(struct notifier_block *n);
22 int rcu_stall_chain_notifier_unregister(struct notifier_block *n);
23
24 #else // #ifdef CONFIG_RCU_STALL_COMMON
25
26 // No RCU CPU stall warnings in Tiny RCU.
27 static inline int rcu_stall_chain_notifier_register(struct notifier_block *n) { return -EEXIST; }
28 static inline int rcu_stall_chain_notifier_unregister(struct notifier_block *n) { return -ENOENT; }
29
30 #endif // #else // #ifdef CONFIG_RCU_STALL_COMMON
31
32 #endif /* __LINUX_RCU_NOTIFIER_H */