| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 class FreeBSDMutex : public Mutex { | 547 class FreeBSDMutex : public Mutex { |
| 548 public: | 548 public: |
| 549 FreeBSDMutex() { | 549 FreeBSDMutex() { |
| 550 pthread_mutexattr_t attrs; | 550 pthread_mutexattr_t attrs; |
| 551 int result = pthread_mutexattr_init(&attrs); | 551 int result = pthread_mutexattr_init(&attrs); |
| 552 ASSERT(result == 0); | 552 ASSERT(result == 0); |
| 553 result = pthread_mutexattr_settype(&attrs, PTHREAD_MUTEX_RECURSIVE); | 553 result = pthread_mutexattr_settype(&attrs, PTHREAD_MUTEX_RECURSIVE); |
| 554 ASSERT(result == 0); | 554 ASSERT(result == 0); |
| 555 result = pthread_mutex_init(&mutex_, &attrs); | 555 result = pthread_mutex_init(&mutex_, &attrs); |
| 556 ASSERT(result == 0); | 556 ASSERT(result == 0); |
| 557 USE(result); |
| 557 } | 558 } |
| 558 | 559 |
| 559 virtual ~FreeBSDMutex() { pthread_mutex_destroy(&mutex_); } | 560 virtual ~FreeBSDMutex() { pthread_mutex_destroy(&mutex_); } |
| 560 | 561 |
| 561 virtual int Lock() { | 562 virtual int Lock() { |
| 562 int result = pthread_mutex_lock(&mutex_); | 563 int result = pthread_mutex_lock(&mutex_); |
| 563 return result; | 564 return result; |
| 564 } | 565 } |
| 565 | 566 |
| 566 virtual int Unlock() { | 567 virtual int Unlock() { |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 | 892 |
| 892 | 893 |
| 893 void Sampler::Stop() { | 894 void Sampler::Stop() { |
| 894 ASSERT(IsActive()); | 895 ASSERT(IsActive()); |
| 895 SignalSender::RemoveActiveSampler(this); | 896 SignalSender::RemoveActiveSampler(this); |
| 896 SetActive(false); | 897 SetActive(false); |
| 897 } | 898 } |
| 898 | 899 |
| 899 | 900 |
| 900 } } // namespace v8::internal | 901 } } // namespace v8::internal |
| OLD | NEW |