OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/threading/platform_thread.h" | 5 #include "base/threading/platform_thread.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <sched.h> | 8 #include <sched.h> |
| 9 #include <stddef.h> |
9 | 10 |
10 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/threading/thread_id_name_manager.h" | 13 #include "base/threading/thread_id_name_manager.h" |
13 #include "base/tracked_objects.h" | 14 #include "base/tracked_objects.h" |
| 15 #include "build/build_config.h" |
14 | 16 |
15 #if !defined(OS_NACL) | 17 #if !defined(OS_NACL) |
16 #include <pthread.h> | 18 #include <pthread.h> |
17 #include <sys/prctl.h> | 19 #include <sys/prctl.h> |
18 #include <sys/types.h> | 20 #include <sys/types.h> |
19 #include <unistd.h> | 21 #include <unistd.h> |
20 #endif | 22 #endif |
21 | 23 |
22 namespace base { | 24 namespace base { |
23 | 25 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #if !defined(THREAD_SANITIZER) | 90 #if !defined(THREAD_SANITIZER) |
89 return 0; | 91 return 0; |
90 #else | 92 #else |
91 // ThreadSanitizer bloats the stack heavily. Evidence has been that the | 93 // ThreadSanitizer bloats the stack heavily. Evidence has been that the |
92 // default stack size isn't enough for some browser tests. | 94 // default stack size isn't enough for some browser tests. |
93 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). | 95 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). |
94 #endif | 96 #endif |
95 } | 97 } |
96 | 98 |
97 } // namespace base | 99 } // namespace base |
OLD | NEW |