OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |