perf bench: Add missing pthread.h include for CPU_*() macros

Cc: David Ahern <dsahern@gmail.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-48qbfv7tqs8n8ey74lbyfjtq@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 c8b5f2c9
...@@ -8,8 +8,10 @@ ...@@ -8,8 +8,10 @@
* many threads and futexes as possible. * many threads and futexes as possible.
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../util/util.h"
#include "../util/stat.h" #include "../util/stat.h"
#include <subcmd/parse-options.h> #include <subcmd/parse-options.h>
#include "../util/header.h" #include "../util/header.h"
...@@ -17,9 +19,7 @@ ...@@ -17,9 +19,7 @@
#include "futex.h" #include "futex.h"
#include <err.h> #include <err.h>
#include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h>
static unsigned int nthreads = 0; static unsigned int nthreads = 0;
static unsigned int nsecs = 10; static unsigned int nsecs = 10;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
* Copyright (C) 2015 Davidlohr Bueso. * Copyright (C) 2015 Davidlohr Bueso.
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../util/util.h" #include "../util/util.h"
#include "../util/stat.h" #include "../util/stat.h"
...@@ -13,7 +16,6 @@ ...@@ -13,7 +16,6 @@
#include <err.h> #include <err.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h>
struct worker { struct worker {
int tid; int tid;
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
* requeues without waking up any tasks -- thus mimicking a regular futex_wait. * requeues without waking up any tasks -- thus mimicking a regular futex_wait.
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../util/util.h" #include "../util/util.h"
#include "../util/stat.h" #include "../util/stat.h"
...@@ -19,7 +22,6 @@ ...@@ -19,7 +22,6 @@
#include <err.h> #include <err.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h>
static u_int32_t futex1 = 0, futex2 = 0; static u_int32_t futex1 = 0, futex2 = 0;
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* it can be used to measure futex_wake() changes. * it can be used to measure futex_wake() changes.
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../util/util.h" #include "../util/util.h"
#include "../util/stat.h" #include "../util/stat.h"
...@@ -18,7 +21,6 @@ ...@@ -18,7 +21,6 @@
#include <err.h> #include <err.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h>
struct thread_data { struct thread_data {
pthread_t worker; pthread_t worker;
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
* one or more tasks, and thus the waitqueue is never empty. * one or more tasks, and thus the waitqueue is never empty.
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../util/util.h" #include "../util/util.h"
#include "../util/stat.h" #include "../util/stat.h"
...@@ -19,7 +22,6 @@ ...@@ -19,7 +22,6 @@
#include <err.h> #include <err.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h>
/* all threads will block on the same futex */ /* all threads will block on the same futex */
static u_int32_t futex1 = 0; static u_int32_t futex1 = 0;
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
* numa: Simulate NUMA-sensitive workload and measure their NUMA performance * numa: Simulate NUMA-sensitive workload and measure their NUMA performance
*/ */
/* For the CLR_() macros */
#include <pthread.h>
#include "../perf.h" #include "../perf.h"
#include "../builtin.h" #include "../builtin.h"
#include "../util/util.h" #include "../util/util.h"
...@@ -21,7 +24,6 @@ ...@@ -21,7 +24,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <pthread.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册