| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 <stddef.h> |
| 6 |
| 5 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 6 #include "base/macros.h" | 8 #include "base/macros.h" |
| 7 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 8 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
| 11 #include "build/build_config.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 13 |
| 11 #if defined(OS_POSIX) | 14 #if defined(OS_POSIX) |
| 12 #include <sys/types.h> | 15 #include <sys/types.h> |
| 13 #include <unistd.h> | 16 #include <unistd.h> |
| 14 #elif defined(OS_WIN) | 17 #elif defined(OS_WIN) |
| 15 #include <windows.h> | 18 #include <windows.h> |
| 16 #endif | 19 #endif |
| 17 | 20 |
| 18 namespace base { | 21 namespace base { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); | 266 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); |
| 264 thread.WaitForTerminationReady(); | 267 thread.WaitForTerminationReady(); |
| 265 ASSERT_TRUE(thread.IsRunning()); | 268 ASSERT_TRUE(thread.IsRunning()); |
| 266 | 269 |
| 267 thread.MarkForTermination(); | 270 thread.MarkForTermination(); |
| 268 PlatformThread::Join(handle); | 271 PlatformThread::Join(handle); |
| 269 ASSERT_FALSE(thread.IsRunning()); | 272 ASSERT_FALSE(thread.IsRunning()); |
| 270 } | 273 } |
| 271 | 274 |
| 272 } // namespace base | 275 } // namespace base |
| OLD | NEW |