| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/base/platform/platform.h" | 5 #include "src/base/platform/platform.h" |
| 6 | 6 |
| 7 #if V8_OS_POSIX | 7 #if V8_OS_POSIX |
| 8 #include <unistd.h> // NOLINT | 8 #include <unistd.h> // NOLINT |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 EXPECT_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId()); | 21 EXPECT_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId()); |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 #if V8_OS_WIN | 24 #if V8_OS_WIN |
| 25 EXPECT_EQ(static_cast<int>(::GetCurrentProcessId()), | 25 EXPECT_EQ(static_cast<int>(::GetCurrentProcessId()), |
| 26 OS::GetCurrentProcessId()); | 26 OS::GetCurrentProcessId()); |
| 27 #endif | 27 #endif |
| 28 } | 28 } |
| 29 | 29 |
| 30 | 30 |
| 31 TEST(OS, NumberOfProcessorsOnline) { | |
| 32 EXPECT_GT(OS::NumberOfProcessorsOnline(), 0); | |
| 33 } | |
| 34 | |
| 35 | |
| 36 namespace { | 31 namespace { |
| 37 | 32 |
| 38 class SelfJoinThread V8_FINAL : public Thread { | 33 class SelfJoinThread V8_FINAL : public Thread { |
| 39 public: | 34 public: |
| 40 SelfJoinThread() : Thread(Options("SelfJoinThread")) {} | 35 SelfJoinThread() : Thread(Options("SelfJoinThread")) {} |
| 41 virtual void Run() V8_OVERRIDE { Join(); } | 36 virtual void Run() V8_OVERRIDE { Join(); } |
| 42 }; | 37 }; |
| 43 | 38 |
| 44 } | 39 } |
| 45 | 40 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 101 |
| 107 | 102 |
| 108 TEST_F(ThreadLocalStorageTest, DoTest) { | 103 TEST_F(ThreadLocalStorageTest, DoTest) { |
| 109 Run(); | 104 Run(); |
| 110 Start(); | 105 Start(); |
| 111 Join(); | 106 Join(); |
| 112 } | 107 } |
| 113 | 108 |
| 114 } // namespace base | 109 } // namespace base |
| 115 } // namespace v8 | 110 } // namespace v8 |
| OLD | NEW |