Merge pull request #9812 from jia200x/pr/pthread_fix

posix/pthread_rwlock: fix unsigned variable comparison
This commit is contained in:
Kevin Weiss 2018-08-21 16:35:14 +02:00 committed by GitHub
commit a04bb5ed8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ static int pthread_rwlock_timedlock(pthread_rwlock_t *rwlock,
uint64_t then = ((uint64_t)abstime->tv_sec * US_PER_SEC) +
(abstime->tv_nsec / NS_PER_US);
if ((then - now) <= 0) {
if (now >= then) {
return ETIMEDOUT;
}
else {