[Bug 50292] Process-local synchronization objects use private interfaces into the Unix library
WineHQ Bugzilla
wine-bugs at winehq.org
Wed Feb 3 20:49:00 CST 2021
https://bugs.winehq.org/show_bug.cgi?id=50292
--- Comment #14 from Zebediah Figura <z.figura12 at gmail.com> ---
(In reply to Jacek Caban from comment #13)
> I'm not sure how that would help, I guess that we're thinking about
> different implementation details. There is a global limit of threads implied
> by the fact that thread ids are 30 bits (a DWORD value with two least
> significant bit ignored). We could have tid_cache similar to fd_cache:
>
> - in NtCreateThreadEx: ensure that tid_cache[tid >> tid_cache_shift] is
> allocated and mark tid_cache[tid >> tid_cache_shift][tid & tid_cache_mask]
> as valid
>
> - in NtWaitForAlertByThreadId and NtAlertThreadByThreadId: use only
> tid_cache for thread-specific data
>
> - when terminating thread: mark appropriate tid_cache as invalid
>
Sure. On the other hand, even for a two-tiered array like that 2**30 (times 8
or 16 bytes) is arguably a lot of storage to reserve. I don't really know
what's reasonable, though.
--
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