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

Side by Side Diff: runtime/platform/thread_win.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_macos.cc ('k') | runtime/vm/isolate.h » ('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 <process.h> 7 #include <process.h>
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void Thread::DeleteThreadLocal(ThreadLocalKey key) { 77 void Thread::DeleteThreadLocal(ThreadLocalKey key) {
78 ASSERT(key != kUnsetThreadLocalKey); 78 ASSERT(key != kUnsetThreadLocalKey);
79 BOOL result = TlsFree(key); 79 BOOL result = TlsFree(key);
80 if (!result) { 80 if (!result) {
81 FATAL("TlsFree failed"); 81 FATAL("TlsFree failed");
82 } 82 }
83 } 83 }
84 84
85 85
86 intptr_t Thread::GetMaxStackSize() { 86 intptr_t Thread::GetMaxStackSize() {
87 const int kStackSize = (1024 * KB); 87 const int kStackSize = (512 * KB);
88 return kStackSize; 88 return kStackSize;
89 } 89 }
90 90
91 91
92 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) { 92 void Thread::SetThreadLocal(ThreadLocalKey key, uword value) {
93 ASSERT(key != kUnsetThreadLocalKey); 93 ASSERT(key != kUnsetThreadLocalKey);
94 BOOL result = TlsSetValue(key, reinterpret_cast<void*>(value)); 94 BOOL result = TlsSetValue(key, reinterpret_cast<void*>(value));
95 if (!result) { 95 if (!result) {
96 FATAL("TlsSetValue failed"); 96 FATAL("TlsSetValue failed");
97 } 97 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 void Monitor::NotifyAll() { 329 void Monitor::NotifyAll() {
330 // If one of the objects in the list of waiters wakes because of a 330 // If one of the objects in the list of waiters wakes because of a
331 // timeout before we signal it, that object will get an extra 331 // timeout before we signal it, that object will get an extra
332 // signal. This will be treated as a spurious wake-up and is OK 332 // signal. This will be treated as a spurious wake-up and is OK
333 // since all uses of monitors should recheck the condition after a 333 // since all uses of monitors should recheck the condition after a
334 // Wait. 334 // Wait.
335 data_.SignalAndRemoveAllWaiters(); 335 data_.SignalAndRemoveAllWaiters();
336 } 336 }
337 337
338 } // namespace dart 338 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/thread_macos.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698