Ignore:
Timestamp:
02/09/17 11:08:31 (7 years ago)
Author:
Sanahuja Guillaume
Message:

modif sterror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/ConditionVariable_impl.cpp

    r15 r133  
    3333  status = pthread_cond_init(&m_ResumeCond, 0);
    3434#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        }
    3739}
    3840
     
    4547  status = pthread_cond_destroy(&m_ResumeCond);
    4648#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        }
    4953}
    5054
     
    5761  status = pthread_cond_wait(&m_ResumeCond, &self->Mutex::pimpl_->mutex);
    5862#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        }
    6167}
    6268
     
    7480  if (status == 0)
    7581    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        }
    7886  return false;
    7987}
     
    8694  status = pthread_cond_signal(&m_ResumeCond);
    8795#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        }
    90100}
Note: See TracChangeset for help on using the changeset viewer.