summaryrefslogtreecommitdiff
path: root/tools/sched_ext/scx_simple.c
diff options
context:
space:
mode:
authorAndrea Righi <arighi@nvidia.com>2025-08-04 13:04:49 +0200
committerTejun Heo <tj@kernel.org>2025-08-11 08:21:57 -1000
commitde68c05189cc4508c3ac4e1e44da1ddb16b1bceb (patch)
tree77e1e875b14e01ae82af84da1ff3e3f76c4cbf5f /tools/sched_ext/scx_simple.c
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff)
tools/sched_ext: Receive updates from SCX repo
Receive tools/sched_ext updates form https://github.com/sched-ext/scx to sync userspace bits: - basic BPF arena allocator abstractions, - additional process flags definitions, - fixed is_migration_disabled() helper, - separate out user_exit_info BPF and user space code. This also fixes the following warning when building the selftests: tools/sched_ext/include/scx/common.bpf.h:550:9: warning: 'likely' macro redefined [-Wmacro-redefined] 550 | #define likely(x) __builtin_expect(!!(x), 1) | ^ Co-developed-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/sched_ext/scx_simple.c')
-rw-r--r--tools/sched_ext/scx_simple.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/sched_ext/scx_simple.c b/tools/sched_ext/scx_simple.c
index 76d83199545c..06d4b13bf76b 100644
--- a/tools/sched_ext/scx_simple.c
+++ b/tools/sched_ext/scx_simple.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
+#include <assert.h>
#include <libgen.h>
#include <bpf/bpf.h>
#include <scx/common.h>
@@ -41,6 +42,7 @@ static void sigint_handler(int simple)
static void read_stats(struct scx_simple *skel, __u64 *stats)
{
int nr_cpus = libbpf_num_possible_cpus();
+ assert(nr_cpus > 0);
__u64 cnts[2][nr_cpus];
__u32 idx;