MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_pthread_cond_timedwait

Function my_pthread_cond_timedwait

mysys/my_pthread.c:395–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393#if defined(HPUX10) || defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT)
394
395int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
396 struct timespec *abstime)
397{
398 int error=pthread_cond_timedwait(cond, mutex, abstime);
399 if (error == -1) /* Safety if the lib is fixed */
400 {
401 if (!(error=errno))
402 error= ETIMEDOUT; /* Can happen on HPUX */
403 }
404 if (error == EAGAIN) /* Correct errno to Posix */
405 error= ETIMEDOUT;
406 return error;
407}
408#endif
409
410#if defined(HPUX10)

Callers

nothing calls this directly

Calls 1

pthread_cond_timedwaitFunction · 0.85

Tested by

no test coverage detected