1 /* SPDX-License-Identifier: GPL-2.0-or-later * 1 2 #ifndef _LINUX_LIVEPATCH_SCHED_H_ 3 #define _LINUX_LIVEPATCH_SCHED_H_ 4 5 #include <linux/jump_label.h> 6 #include <linux/static_call_types.h> 7 8 #ifdef CONFIG_LIVEPATCH 9 10 void __klp_sched_try_switch(void); 11 12 #if !defined(CONFIG_PREEMPT_DYNAMIC) || !defin 13 14 DECLARE_STATIC_KEY_FALSE(klp_sched_try_switch_ 15 16 static __always_inline void klp_sched_try_swit 17 { 18 if (static_branch_unlikely(&klp_sched_ 19 __klp_sched_try_switch(); 20 } 21 22 #endif /* !CONFIG_PREEMPT_DYNAMIC || !CONFIG_H 23 24 #else /* !CONFIG_LIVEPATCH */ 25 static inline void klp_sched_try_switch(void) 26 static inline void __klp_sched_try_switch(void 27 #endif /* CONFIG_LIVEPATCH */ 28 29 #endif /* _LINUX_LIVEPATCH_SCHED_H_ */ 30
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.