| 7 | namespace internal { |
| 8 | |
| 9 | static inline int DebugEnabled(int type) |
| 10 | { |
| 11 | #ifdef NDEBUG |
| 12 | return type; |
| 13 | #else |
| 14 | if (type == PTHREAD_MUTEX_RECURSIVE) |
| 15 | return type; |
| 16 | // Alwasy enable errcheck in debug mode |
| 17 | return PTHREAD_MUTEX_ERRORCHECK_NP; |
| 18 | #endif |
| 19 | } |
| 20 | |
| 21 | MutexBase::MutexBase(int type) |
| 22 | { |