mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
Merge branch 'backport-958-gcond-errno-glib-2-60' into 'glib-2-60'
gthread: fix minor errno problem in GCond See merge request GNOME/glib!965
This commit is contained in:
commit
6c3a821d39
@ -1439,6 +1439,7 @@ g_cond_wait_until (GCond *cond,
|
||||
struct timespec span;
|
||||
guint sampled;
|
||||
int res;
|
||||
gboolean success;
|
||||
|
||||
if (end_time < 0)
|
||||
return FALSE;
|
||||
@ -1458,9 +1459,10 @@ g_cond_wait_until (GCond *cond,
|
||||
sampled = cond->i[0];
|
||||
g_mutex_unlock (mutex);
|
||||
res = syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAIT_PRIVATE, (gsize) sampled, &span);
|
||||
success = (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE;
|
||||
g_mutex_lock (mutex);
|
||||
|
||||
return (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE;
|
||||
return success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user