aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lttng-ust/musl-sched-getcpu.patch
blob: 48f3b43e517cc7b7497074e057188337195ffd87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- lttng-ust-2.8.0.orig/libringbuffer/getcpu.h
+++ lttng-ust-2.8.0/libringbuffer/getcpu.h
@@ -47,10 +47,6 @@
  */
 #ifdef __linux__
 
-/* old uClibc versions didn't have sched_getcpu */
-#if defined(__UCLIBC__) && __UCLIBC_MAJOR__ == 0 && \
-	(__UCLIBC_MINOR__ < 9 || \
-	 (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32))
 #include <sys/syscall.h>
 #define __getcpu(cpu, node, cache)	syscall(__NR_getcpu, cpu, node, cache)
 /*
@@ -64,25 +60,8 @@
 	ret = __getcpu(&cpu, NULL, NULL);
 	if (caa_unlikely(ret < 0))
 		return 0;
-	return c;
-}
-#else /* __UCLIBC__ */
-#include <sched.h>
-
-/*
- * If getcpu is not implemented in the kernel, use cpu 0 as fallback.
- */
-static inline
-int lttng_ust_get_cpu_internal(void)
-{
-	int cpu;
-
-	cpu = sched_getcpu();
-	if (caa_unlikely(cpu < 0))
-		return 0;
 	return cpu;
 }
-#endif	/* __UCLIBC__ */
 
 #elif (defined(__FreeBSD__) || defined(__CYGWIN__))