Skip to content
Snippets Groups Projects
Unverified Commit a04bb5ed authored by Kevin Weiss's avatar Kevin Weiss Committed by GitHub
Browse files

Merge pull request #9812 from jia200x/pr/pthread_fix

posix/pthread_rwlock: fix unsigned variable comparison
parents 69b2baee f2ff06c9
No related branches found
No related tags found
No related merge requests found
...@@ -191,7 +191,7 @@ static int pthread_rwlock_timedlock(pthread_rwlock_t *rwlock, ...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment