Page MenuHomeFreeBSD

D61381.1794458944.diff
No OneTemporary

Authored By
Unknown
Size
778 B
Referenced Files
None
Subscribers
None

D61381.1794458944.diff

diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -905,8 +905,9 @@
mutex_self_lock(struct pthread_mutex *m, const struct timespec *abstime,
clockid_t clockid)
{
- struct timespec ts1, ts2;
+ struct timespec ts1;
int ret;
+ u_int dummy;
switch (PMUTEX_TYPE(m->m_flags)) {
case PTHREAD_MUTEX_ERRORCHECK:
@@ -932,8 +933,11 @@
clock_gettime(clockid, &ts1) == -1) {
ret = EINVAL;
} else {
- TIMESPEC_SUB(&ts2, abstime, &ts1);
- __sys_nanosleep(&ts2, NULL);
+ dummy = 0;
+ do {
+ ret = _thr_umtx_timedwait_uint(&dummy,
+ 0, clockid, abstime, 0);
+ } while (ret == 0 || ret == EINTR);
ret = ETIMEDOUT;
}
} else {

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 4:49 AM (4 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41653154
Default Alt Text
D61381.1794458944.diff (778 B)

Event Timeline