Skip to contentSkip to conversation

trace-cmd: Remove unused <pthread.h> includes.

PATCH In review Slavomir Kaslev 2 participants 2 messages Sep 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd: Remove unused <pthread.h> includes.

There are several <pthread.h> includes lurking eventhough trace-cmd makes no use of threading. This patch gets rid of them.

---
 tracecmd/trace-output.c  | 1 -
 tracecmd/trace-read.c    | 1 -
 tracecmd/trace-record.c  | 1 -
 tracecmd/trace-restore.c | 1 -
 tracecmd/trace-split.c   | 1 -
 5 files changed, 5 deletions(-)
tracecmd/trace-output.c +0 -1
index ff7b198..e439c44 100644
@@ -14,7 +14,6 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/mman.h>
-#include <pthread.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <ctype.h>
tracecmd/trace-read.c +0 -1
index 02f0ce8..35d70c3 100644
@@ -14,7 +14,6 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/mman.h>
-#include <pthread.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <unistd.h>
tracecmd/trace-record.c +0 -1
index 5a1d2a0..ce550a2 100644
@@ -24,7 +24,6 @@
 #endif
 #endif
 #include <netdb.h>
-#include <pthread.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <ctype.h>
tracecmd/trace-restore.c +0 -1
index 1544cf2..b649cf4 100644
@@ -14,7 +14,6 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/mman.h>
-#include <pthread.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <unistd.h>
tracecmd/trace-split.c +0 -1
index cabcc3d..5b2fc4f 100644
@@ -15,7 +15,6 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/mman.h>
-#include <pthread.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <ctype.h>
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · On Fri, 21 Sep 2018 15:30:27 +0300 Slavomir Kaslev <[email protected]> wrote:

There are several <pthread.h> includes lurking eventhough trace-cmd makes no use of threading. This patch gets rid of them.

---

Thanks Slavomir!

Those includes look to be a relic of a past design. I think I started with threads, and then went to forking processes. That's how the pthread header got there, and then cut & paste let it spread ;-)

-- Steve