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

Side by Side Diff: vm/thread_win.cc

Issue 8673002: - Refactor the isolate callback mechanism to also include creation of the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « vm/thread_macos.cc ('k') | vm/unit_test.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 <process.h> 5 #include <process.h>
6 6
7 #include "vm/thread.h" 7 #include "vm/thread.h"
8 8
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 delete thread; 48 delete thread;
49 49
50 return 0; 50 return 0;
51 } 51 }
52 52
53 53
54 Thread::Thread(ThreadStartFunction function, uword parameter) { 54 Thread::Thread(ThreadStartFunction function, uword parameter) {
55 ThreadStartData* start_data = new ThreadStartData(function, parameter, this); 55 ThreadStartData* start_data = new ThreadStartData(function, parameter, this);
56 uint32_t tid; 56 uint32_t tid;
57 data_.thread_handle_ = 57 data_.thread_handle_ =
58 _beginthreadex(NULL, 32 * KB, ThreadEntry, start_data, 0, &tid); 58 _beginthreadex(NULL, 64 * KB, ThreadEntry, start_data, 0, &tid);
59 if (data_.thread_handle_ == -1) { 59 if (data_.thread_handle_ == -1) {
60 FATAL("Thread creation failed"); 60 FATAL("Thread creation failed");
61 } 61 }
62 data_.tid_ = tid; 62 data_.tid_ = tid;
63 } 63 }
64 64
65 65
66 Thread::~Thread() { 66 Thread::~Thread() {
67 CloseHandle(reinterpret_cast<HANDLE>(data_.thread_handle_)); 67 CloseHandle(reinterpret_cast<HANDLE>(data_.thread_handle_));
68 } 68 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void Monitor::Notify() { 163 void Monitor::Notify() {
164 WakeConditionVariable(&data_.cond_); 164 WakeConditionVariable(&data_.cond_);
165 } 165 }
166 166
167 167
168 void Monitor::NotifyAll() { 168 void Monitor::NotifyAll() {
169 WakeAllConditionVariable(&data_.cond_); 169 WakeAllConditionVariable(&data_.cond_);
170 } 170 }
171 171
172 } // namespace dart 172 } // namespace dart
OLDNEW
« no previous file with comments | « vm/thread_macos.cc ('k') | vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698