Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / sched_ext / enq_last_no_enq_fails.bpf.c
blobe1bd13e48889f107b2fbae271b16f6976285212a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * A scheduler that validates the behavior of direct dispatching with a default
4 * select_cpu implementation.
6 * Copyright (c) 2023 Meta Platforms, Inc. and affiliates.
7 * Copyright (c) 2023 David Vernet <dvernet@meta.com>
8 * Copyright (c) 2023 Tejun Heo <tj@kernel.org>
9 */
11 #include <scx/common.bpf.h>
13 char _license[] SEC("license") = "GPL";
15 u32 exit_kind;
17 void BPF_STRUCT_OPS_SLEEPABLE(enq_last_no_enq_fails_exit, struct scx_exit_info *info)
19 exit_kind = info->kind;
22 SEC(".struct_ops.link")
23 struct sched_ext_ops enq_last_no_enq_fails_ops = {
24 .name = "enq_last_no_enq_fails",
25 /* Need to define ops.enqueue() with SCX_OPS_ENQ_LAST */
26 .flags = SCX_OPS_ENQ_LAST,
27 .exit = (void *) enq_last_no_enq_fails_exit,
28 .timeout_ms = 1000U,