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 "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 #include <stddef.h> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // We expect EPERM failures in sandboxed processes, just ignore those. | 87 // We expect EPERM failures in sandboxed processes, just ignore those. |
88 if (err < 0 && errno != EPERM) | 88 if (err < 0 && errno != EPERM) |
89 DPLOG(ERROR) << "prctl(PR_SET_NAME)"; | 89 DPLOG(ERROR) << "prctl(PR_SET_NAME)"; |
90 #endif // !defined(OS_NACL) | 90 #endif // !defined(OS_NACL) |
91 } | 91 } |
92 | 92 |
93 void InitThreading() {} | 93 void InitThreading() {} |
94 | 94 |
95 void TerminateOnThread() {} | 95 void TerminateOnThread() {} |
96 | 96 |
97 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { | 97 size_t GetDefaultThreadStackSize(const pthread_attr_t& /*attributes*/) { |
98 #if !defined(THREAD_SANITIZER) | 98 #if !defined(THREAD_SANITIZER) |
99 return 0; | 99 return 0; |
100 #else | 100 #else |
101 // ThreadSanitizer bloats the stack heavily. Evidence has been that the | 101 // ThreadSanitizer bloats the stack heavily. Evidence has been that the |
102 // default stack size isn't enough for some browser tests. | 102 // default stack size isn't enough for some browser tests. |
103 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). | 103 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). |
104 #endif | 104 #endif |
105 } | 105 } |
106 | 106 |
107 } // namespace base | 107 } // namespace base |
OLD | NEW |