mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-05 07:10:35 -05:00
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
This commit is contained in:
committed by
Michael Ellerman
parent
e2c043163d
commit
a1ea0ca8a6
@@ -14,6 +14,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <signal.h>
|
||||
|
||||
static volatile int soak_done;
|
||||
@@ -121,7 +122,7 @@ static void do_null_syscall(unsigned long nr)
|
||||
unsigned long i;
|
||||
|
||||
for (i = 0; i < nr; i++)
|
||||
getppid();
|
||||
syscall(__NR_gettid);
|
||||
}
|
||||
|
||||
#define TIME(A, STR) \
|
||||
|
||||
Reference in New Issue
Block a user