mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
g_cond_timed_wait: support NULL time parameter
It was undocumented, but this used to mean "wait forever". Looks like we have some uses of this internally and there may be others in the wild...
This commit is contained in:
parent
4033c616ff
commit
14e3b12823
@ -1551,6 +1551,12 @@ g_cond_timed_wait (GCond *cond,
|
||||
{
|
||||
gint64 end_time;
|
||||
|
||||
if (abs_time == NULL)
|
||||
{
|
||||
g_cond_wait (cond, mutex);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
end_time = abs_time->tv_sec;
|
||||
end_time *= 1000000;
|
||||
end_time += abs_time->tv_usec;
|
||||
|
Loading…
Reference in New Issue
Block a user