linux-stable/include/linux/sched/smt.h
Ingo Molnar 1632d47fae sched/headers: Standardize the <linux/sched/smt.h> header guard #endif
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2023-09-21 11:28:48 +02:00

20 lines
440 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SCHED_SMT_H
#define _LINUX_SCHED_SMT_H
#include <linux/static_key.h>
#ifdef CONFIG_SCHED_SMT
extern struct static_key_false sched_smt_present;
static __always_inline bool sched_smt_active(void)
{
return static_branch_likely(&sched_smt_present);
}
#else
static inline bool sched_smt_active(void) { return false; }
#endif
void arch_smt_update(void);
#endif /* _LINUX_SCHED_SMT_H */