1 #ifndef __PERF_MUSL_COMPAT_H
2 #define __PERF_MUSL_COMPAT_H
18 #define _SC_LEVEL1_DCACHE_LINESIZE -1
20 static inline long sysconf_wrap(int name
)
26 case _SC_LEVEL1_DCACHE_LINESIZE
:
27 f
= fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
31 if (fscanf(f
, "%d", &val
) != 1)
41 #define sysconf(_n) sysconf_wrap(_n)
43 static inline int compat_sched_getcpu(void)
48 if (syscall(__NR_getcpu
, &val
))
57 #define sched_getcpu compat_sched_getcpu