Implement POSIX pthread_mutex_timedlock.

This replaces the non-standard pthread_mutex_lock_timeout_np, which we have
to keep around on LP32 for binary compatibility.

Change-Id: I098dc7cd38369f0c1bec1fac35687fbd27392e00
This commit is contained in:
Elliott Hughes
2014-03-03 16:42:47 -08:00
parent 8e541b1223
commit 0e714a5b41
6 changed files with 141 additions and 137 deletions

View File

@@ -185,7 +185,7 @@ int __pthread_cond_timedwait(pthread_cond_t* cond, pthread_mutex_t* mutex, const
timespec* tsp;
if (abstime != NULL) {
if (__timespec_to_absolute(&ts, abstime, clock) < 0) {
if (__timespec_from_absolute(&ts, abstime, clock) < 0) {
return ETIMEDOUT;
}
tsp = &ts;