| 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 class LinuxMutex : public Mutex { | 727 class LinuxMutex : public Mutex { |
| 728 public: | 728 public: |
| 729 LinuxMutex() { | 729 LinuxMutex() { |
| 730 pthread_mutexattr_t attrs; | 730 pthread_mutexattr_t attrs; |
| 731 int result = pthread_mutexattr_init(&attrs); | 731 int result = pthread_mutexattr_init(&attrs); |
| 732 ASSERT(result == 0); | 732 ASSERT(result == 0); |
| 733 result = pthread_mutexattr_settype(&attrs, PTHREAD_MUTEX_RECURSIVE); | 733 result = pthread_mutexattr_settype(&attrs, PTHREAD_MUTEX_RECURSIVE); |
| 734 ASSERT(result == 0); | 734 ASSERT(result == 0); |
| 735 result = pthread_mutex_init(&mutex_, &attrs); | 735 result = pthread_mutex_init(&mutex_, &attrs); |
| 736 ASSERT(result == 0); | 736 ASSERT(result == 0); |
| 737 USE(result); |
| 737 } | 738 } |
| 738 | 739 |
| 739 virtual ~LinuxMutex() { pthread_mutex_destroy(&mutex_); } | 740 virtual ~LinuxMutex() { pthread_mutex_destroy(&mutex_); } |
| 740 | 741 |
| 741 virtual int Lock() { | 742 virtual int Lock() { |
| 742 int result = pthread_mutex_lock(&mutex_); | 743 int result = pthread_mutex_lock(&mutex_); |
| 743 return result; | 744 return result; |
| 744 } | 745 } |
| 745 | 746 |
| 746 virtual int Unlock() { | 747 virtual int Unlock() { |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 | 1121 |
| 1121 | 1122 |
| 1122 void Sampler::Stop() { | 1123 void Sampler::Stop() { |
| 1123 ASSERT(IsActive()); | 1124 ASSERT(IsActive()); |
| 1124 SignalSender::RemoveActiveSampler(this); | 1125 SignalSender::RemoveActiveSampler(this); |
| 1125 SetActive(false); | 1126 SetActive(false); |
| 1126 } | 1127 } |
| 1127 | 1128 |
| 1128 | 1129 |
| 1129 } } // namespace v8::internal | 1130 } } // namespace v8::internal |
| OLD | NEW |