mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
More reliably check timeout for pthread_mutex_timedlock.
This commit is contained in:
parent
5091e3df70
commit
d5c854e890
2 changed files with 2 additions and 2 deletions
|
|
@ -752,7 +752,7 @@ mutex_lock_common(struct pthread *curthread, pthread_mutex_t *m,
|
|||
} while (((*m)->m_owner != curthread) && (ret == 0) &&
|
||||
(curthread->interrupted == 0) && (curthread->timeout == 0));
|
||||
|
||||
if (ret == 0 && curthread->timeout)
|
||||
if (ret == 0 && (*m)->m_owner != curthread && curthread->timeout)
|
||||
ret = ETIMEDOUT;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ mutex_lock_common(struct pthread *curthread, pthread_mutex_t *m,
|
|||
} while (((*m)->m_owner != curthread) && (ret == 0) &&
|
||||
(curthread->interrupted == 0) && (curthread->timeout == 0));
|
||||
|
||||
if (ret == 0 && curthread->timeout)
|
||||
if (ret == 0 && (*m)->m_owner != curthread && curthread->timeout)
|
||||
ret = ETIMEDOUT;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue