Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: base/threading/platform_thread_freebsd.cc

Issue 1660273004: base: Set initial thread priority in ThreadFunc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format and add comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/threading/platform_thread_android.cc ('k') | base/threading/platform_thread_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <stddef.h>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // main thread because that would rename the process, causing tools like 75 // main thread because that would rename the process, causing tools like
76 // killall to stop working. 76 // killall to stop working.
77 if (PlatformThread::CurrentId() == getpid()) 77 if (PlatformThread::CurrentId() == getpid())
78 return; 78 return;
79 setproctitle("%s", name.c_str()); 79 setproctitle("%s", name.c_str());
80 #endif // !defined(OS_NACL) 80 #endif // !defined(OS_NACL)
81 } 81 }
82 82
83 void InitThreading() {} 83 void InitThreading() {}
84 84
85 void InitOnThread() {}
86
87 void TerminateOnThread() {} 85 void TerminateOnThread() {}
88 86
89 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { 87 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
90 #if !defined(THREAD_SANITIZER) 88 #if !defined(THREAD_SANITIZER)
91 return 0; 89 return 0;
92 #else 90 #else
93 // ThreadSanitizer bloats the stack heavily. Evidence has been that the 91 // ThreadSanitizer bloats the stack heavily. Evidence has been that the
94 // default stack size isn't enough for some browser tests. 92 // default stack size isn't enough for some browser tests.
95 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). 93 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux).
96 #endif 94 #endif
97 } 95 }
98 96
99 } // namespace base 97 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread_android.cc ('k') | base/threading/platform_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698