OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
761 | 761 |
762 | 762 |
763 void Thread::Start() { | 763 void Thread::Start() { |
764 pthread_attr_t* attr_ptr = NULL; | 764 pthread_attr_t* attr_ptr = NULL; |
765 pthread_attr_t attr; | 765 pthread_attr_t attr; |
766 if (stack_size_ > 0) { | 766 if (stack_size_ > 0) { |
767 pthread_attr_init(&attr); | 767 pthread_attr_init(&attr); |
768 pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_)); | 768 pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_)); |
769 attr_ptr = &attr; | 769 attr_ptr = &attr; |
770 } | 770 } |
771 pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this); | 771 int result = pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this); |
772 ASSERT(data_->thread_ != kNoThread); | 772 CHECK_EQ(0, result); |
Vitaly Repeshko
2011/11/09 19:03:47
Let's keep the assert.
| |
773 } | 773 } |
774 | 774 |
775 | 775 |
776 void Thread::Join() { | 776 void Thread::Join() { |
777 pthread_join(data_->thread_, NULL); | 777 pthread_join(data_->thread_, NULL); |
778 } | 778 } |
779 | 779 |
780 | 780 |
781 Thread::LocalStorageKey Thread::CreateThreadLocalKey() { | 781 Thread::LocalStorageKey Thread::CreateThreadLocalKey() { |
782 pthread_key_t key; | 782 pthread_key_t key; |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1209 | 1209 |
1210 | 1210 |
1211 void Sampler::Stop() { | 1211 void Sampler::Stop() { |
1212 ASSERT(IsActive()); | 1212 ASSERT(IsActive()); |
1213 SignalSender::RemoveActiveSampler(this); | 1213 SignalSender::RemoveActiveSampler(this); |
1214 SetActive(false); | 1214 SetActive(false); |
1215 } | 1215 } |
1216 | 1216 |
1217 | 1217 |
1218 } } // namespace v8::internal | 1218 } } // namespace v8::internal |
OLD | NEW |