Files
linux/kernel/sched/ext/arena.h
Tejun Heo 3cd1f76be6 sched_ext: Make kernel/sched/ext/ sources self-contained for clangd
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>
2026-06-22 10:41:26 -10:00

21 lines
614 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* BPF extensible scheduler class: Documentation/scheduler/sched-ext.rst
*
* Copyright (c) 2025 Meta Platforms, Inc. and affiliates.
* Copyright (c) 2025 Tejun Heo <tj@kernel.org>
*/
#ifndef _KERNEL_SCHED_EXT_ARENA_H
#define _KERNEL_SCHED_EXT_ARENA_H
#include <linux/types.h>
struct scx_sched;
s32 scx_arena_pool_init(struct scx_sched *sch);
void scx_arena_pool_destroy(struct scx_sched *sch);
void *scx_arena_alloc(struct scx_sched *sch, size_t size);
void scx_arena_free(struct scx_sched *sch, void *kern_va, size_t size);
#endif /* _KERNEL_SCHED_EXT_ARENA_H */