Reviewers: iposva, Message: Hi Ivan,
I'd like you to do a small code review. The original MacOSMutex constructor makes data race detectors a little bit crazy. Also, the new version is simpler and easier to understand. Thank you Timur Iskhodzhanov Please review this at http://codereview.chromium.org/160099 SVN Base: http://v8.googlecode.com/svn/trunk/ Affected files: M src/platform-macos.cc Index: src/platform-macos.cc =================================================================== --- src/platform-macos.cc (revision 2534) +++ src/platform-macos.cc (working copy) @@ -411,14 +411,10 @@ public: MacOSMutex() { - // For some reason the compiler doesn't allow you to write - // "this->mutex_ = PTHREAD_..." directly on mac. - pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&m, &attr); - mutex_ = m; + pthread_mutex_init(&mutex_, &attr); } ~MacOSMutex() { pthread_mutex_destroy(&mutex_); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "v8-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/v8-dev?hl=en -~----------~----~----~----~------~----~------~--~---
