posix/pthread_rwlock: fix unsigned variable comparison
This commit is contained in:
parent
69b2baeebe
commit
f2ff06c9d4
@ -191,7 +191,7 @@ static int pthread_rwlock_timedlock(pthread_rwlock_t *rwlock,
|
|||||||
uint64_t then = ((uint64_t)abstime->tv_sec * US_PER_SEC) +
|
uint64_t then = ((uint64_t)abstime->tv_sec * US_PER_SEC) +
|
||||||
(abstime->tv_nsec / NS_PER_US);
|
(abstime->tv_nsec / NS_PER_US);
|
||||||
|
|
||||||
if ((then - now) <= 0) {
|
if (now >= then) {
|
||||||
return ETIMEDOUT;
|
return ETIMEDOUT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user