Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/selftests: Use gettid() instead of getppid() for null_syscall

gettid() is 10% lighter than getppid(), use it for null_syscall selftest.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0ad62673d3e063f848e7c99d719bb966efd433e8.1622809833.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
a1ea0ca8 e2c04316

+2 -1
+2 -1
tools/testing/selftests/powerpc/benchmarks/null_syscall.c
··· 14 14 #include <time.h> 15 15 #include <sys/types.h> 16 16 #include <sys/time.h> 17 + #include <sys/syscall.h> 17 18 #include <signal.h> 18 19 19 20 static volatile int soak_done; ··· 122 121 unsigned long i; 123 122 124 123 for (i = 0; i < nr; i++) 125 - getppid(); 124 + syscall(__NR_gettid); 126 125 } 127 126 128 127 #define TIME(A, STR) \