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

Side by Side Diff: runtime/vm/thread_test.cc

Issue 1978153002: Uses an open thread handle as the ThreadJoinId on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« runtime/vm/thread_pool.cc ('K') | « runtime/vm/thread_pool.cc ('k') | no next file » | 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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/isolate.h" 6 #include "vm/isolate.h"
7 #include "vm/lockers.h" 7 #include "vm/lockers.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 #include "vm/profiler.h" 9 #include "vm/profiler.h"
10 #include "vm/safepoint.h" 10 #include "vm/safepoint.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 433 }
434 434
435 435
436 VM_TEST_CASE(ThreadIterator_FindSelf) { 436 VM_TEST_CASE(ThreadIterator_FindSelf) {
437 OSThread* current = OSThread::Current(); 437 OSThread* current = OSThread::Current();
438 EXPECT(OSThread::IsThreadInList(current->join_id())); 438 EXPECT(OSThread::IsThreadInList(current->join_id()));
439 } 439 }
440 440
441 441
442 struct ThreadIteratorTestParams { 442 struct ThreadIteratorTestParams {
443 ThreadId spawned_thread_join_id; 443 ThreadJoinId spawned_thread_join_id;
444 Monitor* monitor; 444 Monitor* monitor;
445 }; 445 };
446 446
447 447
448 void ThreadIteratorTestMain(uword parameter) { 448 void ThreadIteratorTestMain(uword parameter) {
449 ThreadIteratorTestParams* params = 449 ThreadIteratorTestParams* params =
450 reinterpret_cast<ThreadIteratorTestParams*>(parameter); 450 reinterpret_cast<ThreadIteratorTestParams*>(parameter);
451 OSThread* thread = OSThread::Current(); 451 OSThread* thread = OSThread::Current();
452 EXPECT(thread != NULL); 452 EXPECT(thread != NULL);
453 453
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 TransitionVMToBlocked transition(thread); 571 TransitionVMToBlocked transition(thread);
572 MonitorLocker ml(&done_monitor); 572 MonitorLocker ml(&done_monitor);
573 if (done) { 573 if (done) {
574 break; 574 break;
575 } 575 }
576 } 576 }
577 } 577 }
578 } 578 }
579 579
580 } // namespace dart 580 } // namespace dart
OLDNEW
« runtime/vm/thread_pool.cc ('K') | « runtime/vm/thread_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698