diff --git a/sys/posix/pthread/pthread_rwlock.c b/sys/posix/pthread/pthread_rwlock.c index 3e5f7194731b466f7a57af673ff0c0e7be83abae..b644c91afd3fb24667a46ee8304682f3f2b9b14a 100644 --- a/sys/posix/pthread/pthread_rwlock.c +++ b/sys/posix/pthread/pthread_rwlock.c @@ -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 {