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

Side by Side Diff: runtime/platform/thread_linux.cc

Issue 10558013: For now set the stack buffer size to 16k (we need to compute this during thread start and store it … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/platform/thread_macos.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/thread.h" 5 #include "platform/thread.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <sys/time.h> 8 #include <sys/time.h>
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 124
125 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) { 125 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) {
126 ASSERT(key != kUnsetThreadLocalKey); 126 ASSERT(key != kUnsetThreadLocalKey);
127 int result = pthread_setspecific(key, reinterpret_cast<void*>(value)); 127 int result = pthread_setspecific(key, reinterpret_cast<void*>(value));
128 VALIDATE_PTHREAD_RESULT(result); 128 VALIDATE_PTHREAD_RESULT(result);
129 } 129 }
130 130
131 131
132 intptr_t Thread::GetMaxStackSize() { 132 intptr_t Thread::GetMaxStackSize() {
133 const int kStackSize = (1024 * KB); 133 const int kStackSize = (512 * KB);
134 return kStackSize; 134 return kStackSize;
135 } 135 }
136 136
137 137
138 Mutex::Mutex() { 138 Mutex::Mutex() {
139 pthread_mutexattr_t attr; 139 pthread_mutexattr_t attr;
140 int result = pthread_mutexattr_init(&attr); 140 int result = pthread_mutexattr_init(&attr);
141 VALIDATE_PTHREAD_RESULT(result); 141 VALIDATE_PTHREAD_RESULT(result);
142 142
143 #if defined(DEBUG) 143 #if defined(DEBUG)
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 274
275 void Monitor::NotifyAll() { 275 void Monitor::NotifyAll() {
276 // TODO(iposva): Do we need to track lock owners? 276 // TODO(iposva): Do we need to track lock owners?
277 int result = pthread_cond_broadcast(data_.cond()); 277 int result = pthread_cond_broadcast(data_.cond());
278 VALIDATE_PTHREAD_RESULT(result); 278 VALIDATE_PTHREAD_RESULT(result);
279 } 279 }
280 280
281 } // namespace dart 281 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/platform/thread_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698