OSDN Git Service

Merge "kernel.config: add CONFIG_NFS* testing"
[android-x86/system-extras.git] / simpleperf / cmd_stat_test.cpp
index 5aa1e3b..89e75f8 100644 (file)
 #include <android-base/file.h>
 #include <android-base/stringprintf.h>
 #include <android-base/test_utils.h>
-#include <sys/syscall.h>
 
 #include <thread>
 
 #include "command.h"
+#include "environment.h"
 #include "get_test_data.h"
 #include "test_util.h"
 
@@ -159,7 +159,7 @@ TEST(stat_cmd, handle_SIGHUP) {
 TEST(stat_cmd, stop_when_no_more_targets) {
   std::atomic<int> tid(0);
   std::thread thread([&]() {
-    tid = syscall(__NR_gettid);
+    tid = gettid();
     sleep(1);
   });
   thread.detach();