gthread: fix minor errno problem in GCond

The return value from g_cond_wait_until() is calculated, based on the value of errno after reacquiring the mutex. This is a problem because errno can be overwritten in the case the mutex is contended (in which case the slow-path code will re-enter the kernel).

Perform the calculation before reacquiring the mutex.

Merge request reports

Loading