diff options
| author | Tejun Heo <tj@kernel.org> | 2026-04-29 08:09:10 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-04-29 08:25:07 -1000 |
| commit | 32a54807c9a56a161f29f6640f9f4ef88380398c (patch) | |
| tree | 5dbf9593c4a33de3026acf3a0f2a7f8cbc058934 /include/linux/timerqueue_types.h | |
| parent | df7b5ae038d6f2707ec0f81c257a55b4062f77c7 (diff) | |
tools/sched_ext: Add struct_size() helpers to common.bpf.h
Add flex_array_size(), struct_size() and struct_size_t() to
scx/common.bpf.h so BPF schedulers can size flex-array-containing
structs the same way kernel code does. These are abbreviated forms of
the <linux/overflow.h> macros.
v3: Use offsetof() instead of sizeof() in struct_size() to match kernel
semantics (no inflation from trailing struct padding). (Sashiko)
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Reviewed-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
