Skip to content

Commit 793baff

Browse files
redsky110htejun
authored andcommitted
sched_ext: Add __weak to fix the build errors
commit 5cbb302 ("sched_ext: Rename scx_bpf_dispatch[_vtime]_from_dsq*() -> scx_bpf_dsq_move[_vtime]*()") introduced several new functions which caused compilation errors when compiled with clang. Let's fix this by adding __weak markers. Signed-off-by: Honglei Wang <jameshongleiwang@126.com> Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 5cbb302 ("sched_ext: Rename scx_bpf_dispatch[_vtime]_from_dsq*() -> scx_bpf_dsq_move[_vtime]*()") Acked-by: Andrii Nakryiko <andrii@kernel.org>
1 parent 40384c8 commit 793baff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/sched_ext/include/scx/common.bpf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ void scx_bpf_dsq_insert(struct task_struct *p, u64 dsq_id, u64 slice, u64 enq_fl
4040
void scx_bpf_dsq_insert_vtime(struct task_struct *p, u64 dsq_id, u64 slice, u64 vtime, u64 enq_flags) __ksym __weak;
4141
u32 scx_bpf_dispatch_nr_slots(void) __ksym;
4242
void scx_bpf_dispatch_cancel(void) __ksym;
43-
bool scx_bpf_dsq_move_to_local(u64 dsq_id) __ksym;
44-
void scx_bpf_dsq_move_set_slice(struct bpf_iter_scx_dsq *it__iter, u64 slice) __ksym;
45-
void scx_bpf_dsq_move_set_vtime(struct bpf_iter_scx_dsq *it__iter, u64 vtime) __ksym;
43+
bool scx_bpf_dsq_move_to_local(u64 dsq_id) __ksym __weak;
44+
void scx_bpf_dsq_move_set_slice(struct bpf_iter_scx_dsq *it__iter, u64 slice) __ksym __weak;
45+
void scx_bpf_dsq_move_set_vtime(struct bpf_iter_scx_dsq *it__iter, u64 vtime) __ksym __weak;
4646
bool scx_bpf_dsq_move(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak;
4747
bool scx_bpf_dsq_move_vtime(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak;
4848
u32 scx_bpf_reenqueue_local(void) __ksym;

0 commit comments

Comments
 (0)