1#include <profiling.h>
2
3struct scheduler_stats {
4 _Atomic uint64_t steals;
5};
6
7#ifdef PROFILING_SCHED
8static struct scheduler_stats sched_stats = {0};
9
10static inline void sched_profiling_record_steal(void) {
11 atomic_fetch_add(&sched_stats.steals, 1);
12}
13#else
14static inline void sched_profiling_record_steal(void) { /* Nothing */ }
15#endif
16