Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.8.
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
 4 */
 5
 6#include <scx/common.bpf.h>
 7
 8char _license[] SEC("license") = "GPL";
 9
10u64 vtime_test;
11
12void BPF_STRUCT_OPS(maybe_null_running, struct task_struct *p)
13{}
14
15void BPF_STRUCT_OPS(maybe_null_fail_dispatch, s32 cpu, struct task_struct *p)
16{
17	vtime_test = p->scx.dsq_vtime;
18}
19
20SEC(".struct_ops.link")
21struct sched_ext_ops maybe_null_fail = {
22	.dispatch               = (void *) maybe_null_fail_dispatch,
23	.enable			= (void *) maybe_null_running,
24	.name			= "maybe_null_fail_dispatch",
25};