Changeset 133 in flair-src for trunk/lib/FlairCore/src/ConditionVariable_impl.cpp
- Timestamp:
- 02/09/17 11:08:31 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/ConditionVariable_impl.cpp
r15 r133 33 33 status = pthread_cond_init(&m_ResumeCond, 0); 34 34 #endif 35 if (status != 0) 36 self->Err("error creating condition variable (%s)\n", strerror(-status)); 35 if (status != 0) { 36 char errorMsg[256]; 37 self->Err("error creating condition variable (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 38 } 37 39 } 38 40 … … 45 47 status = pthread_cond_destroy(&m_ResumeCond); 46 48 #endif 47 if (status != 0) 48 self->Err("error destroying condition variable (%s)\n", strerror(-status)); 49 if (status != 0) { 50 char errorMsg[256]; 51 self->Err("error destroying condition variable (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 52 } 49 53 } 50 54 … … 57 61 status = pthread_cond_wait(&m_ResumeCond, &self->Mutex::pimpl_->mutex); 58 62 #endif 59 if (status != 0) 60 self->Err("error (%s)\n", strerror(-status)); 63 if (status != 0) { 64 char errorMsg[256]; 65 self->Err("error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 66 } 61 67 } 62 68 … … 74 80 if (status == 0) 75 81 return true; 76 if (status != ETIMEDOUT) 77 self->Err("error (%s)\n", strerror(-status)); 82 if (status != ETIMEDOUT) { 83 char errorMsg[256]; 84 self->Err("error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 85 } 78 86 return false; 79 87 } … … 86 94 status = pthread_cond_signal(&m_ResumeCond); 87 95 #endif 88 if (status != 0) 89 self->Err("error (%s)\n", strerror(-status)); 96 if (status != 0) { 97 char errorMsg[256]; 98 self->Err("error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 99 } 90 100 }
Note:
See TracChangeset
for help on using the changeset viewer.