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

Side by Side Diff: runtime/platform/thread_macos.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 | « runtime/platform/thread_linux.cc ('k') | runtime/platform/thread_win.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 <sys/errno.h> 7 #include <sys/errno.h>
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 108
109 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) { 109 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) {
110 ASSERT(key != kUnsetThreadLocalKey); 110 ASSERT(key != kUnsetThreadLocalKey);
111 int result = pthread_setspecific(key, reinterpret_cast<void*>(value)); 111 int result = pthread_setspecific(key, reinterpret_cast<void*>(value));
112 VALIDATE_PTHREAD_RESULT(result); 112 VALIDATE_PTHREAD_RESULT(result);
113 } 113 }
114 114
115 115
116 intptr_t Thread::GetMaxStackSize() { 116 intptr_t Thread::GetMaxStackSize() {
117 const int kStackSize = (1024 * KB); 117 const int kStackSize = (512 * KB);
118 return kStackSize; 118 return kStackSize;
119 } 119 }
120 120
121 121
122 Mutex::Mutex() { 122 Mutex::Mutex() {
123 pthread_mutexattr_t attr; 123 pthread_mutexattr_t attr;
124 int result = pthread_mutexattr_init(&attr); 124 int result = pthread_mutexattr_init(&attr);
125 VALIDATE_PTHREAD_RESULT(result); 125 VALIDATE_PTHREAD_RESULT(result);
126 126
127 #if defined(DEBUG) 127 #if defined(DEBUG)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 253
254 void Monitor::NotifyAll() { 254 void Monitor::NotifyAll() {
255 // TODO(iposva): Do we need to track lock owners? 255 // TODO(iposva): Do we need to track lock owners?
256 int result = pthread_cond_broadcast(data_.cond()); 256 int result = pthread_cond_broadcast(data_.cond());
257 VALIDATE_PTHREAD_RESULT(result); 257 VALIDATE_PTHREAD_RESULT(result);
258 } 258 }
259 259
260 } // namespace dart 260 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/thread_linux.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698