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 #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER) 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 // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER) 25 26 // No RCU CPU stall warnings in Tiny RCU. rcu_stall_chain_notifier_register(struct notifier_block * n)27static inline int rcu_stall_chain_notifier_register(struct notifier_block *n) { return -EEXIST; } rcu_stall_chain_notifier_unregister(struct notifier_block * n)28static inline int rcu_stall_chain_notifier_unregister(struct notifier_block *n) { return -ENOENT; } 29 30 #endif // #else // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER) 31 32 #endif /* __LINUX_RCU_NOTIFIER_H */ 33