mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
The sources under kernel/sched/ext/ build as a single translation unit: build_policy.c includes the source files and headers. An LSP/clangd editor parses each as a standalone unit, sees no types, and reports a flood of errors. Give each header its dependencies and include guard, and have each source include the headers it uses. ext.c, arena.c and the ext headers now parse clean standalone. idle.c and cid.c still reference a few macros and helpers defined in ext.c. The next patch moves those to shared headers. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
32 lines
964 B
C
32 lines
964 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* BPF extensible scheduler class: Documentation/scheduler/sched-ext.rst
|
|
*
|
|
* Copyright (c) 2022 Meta Platforms, Inc. and affiliates.
|
|
* Copyright (c) 2022 Tejun Heo <tj@kernel.org>
|
|
* Copyright (c) 2022 David Vernet <dvernet@meta.com>
|
|
* Copyright (c) 2024 Andrea Righi <arighi@nvidia.com>
|
|
*/
|
|
#ifndef _KERNEL_SCHED_EXT_IDLE_H
|
|
#define _KERNEL_SCHED_EXT_IDLE_H
|
|
|
|
#include <linux/btf_ids.h>
|
|
|
|
struct cpumask;
|
|
struct sched_ext_ops;
|
|
struct task_struct;
|
|
|
|
extern struct btf_id_set8 scx_kfunc_ids_idle;
|
|
extern struct btf_id_set8 scx_kfunc_ids_select_cpu;
|
|
|
|
void scx_idle_update_selcpu_topology(struct sched_ext_ops *ops);
|
|
void scx_idle_init_masks(void);
|
|
|
|
s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
|
|
const struct cpumask *cpus_allowed, u64 flags);
|
|
void scx_idle_enable(struct sched_ext_ops *ops);
|
|
void scx_idle_disable(void);
|
|
int scx_idle_init(void);
|
|
|
|
#endif /* _KERNEL_SCHED_EXT_IDLE_H */
|