[Bug 50292] Process-local synchronization objects use private interfaces into the Unix library
WineHQ Bugzilla
wine-bugs at winehq.org
Sun Jan 10 06:42:58 CST 2021
https://bugs.winehq.org/show_bug.cgi?id=50292
--- Comment #2 from Rémi Bernon <rbernon at codeweavers.com> ---
> In 0006-ntdll-Implement-thread-id-alerts-on-top-of-futexes-i.patch
>
> + while (!InterlockedExchange( futex, 0 ))
> + {
> + if (timeout)
> + {
> + LONGLONG timeleft = update_timeout( end );
> + struct timespec timespec;
> +
> + timespec.tv_sec = timeleft / (ULONGLONG)TICKSPERSEC;
> + timespec.tv_nsec = (timeleft % TICKSPERSEC) * 100;
> + ret = futex_wait( futex, 0, ×pec );
> + }
> + else
> + ret = futex_wait( futex, 0, NULL );
> +
> + if (ret == -1 && errno == ETIMEDOUT) return STATUS_TIMEOUT;
> + }
If FUTEX_WAIT_BITSET is available, I think you can use it to wait with
an absolute timeout, which could save calls to NtQuerySystemTime.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list