This allows *BSDs to also have a fast path similar to futexes for thread-ID alerts.
Also a kevent with `EV_CLEAR` and `NOTE_TRIGGER` maps perfectly to the thread alertable state, fixing the issue of the current mach-semaphore implementation not correctly waiting in the test case below:
```
NtAlertThreadByThreadId((HANDLE)GetCurrentThreadId());
NtAlertThreadByThreadId((HANDLE)GetCurrentThreadId());
NtWaitForAlertByThreadId(NULL, NULL);
NtWaitForAlertByThreadId(NULL, NULL);
```
I took the liberty to remove this mach semaphore implementation, since all versions of OSX have supported kqueue().
--
v3: ntdll: Implement thread-ID alerts using kqueue/kevent.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4049
In clock_change_state() when a clock is running, a timer is removed from clock->timers. The same
timer is then used to create an async result, which will eventually calls present_clock_timer_callback_Invoke()
and removes the same timer.
--
v2: mf: Avoid a double free of presentation clock timers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3955
It makes sense to use the {id}_{range_first} naming scheme for SRVs, UAVs and samplers too because their registers contain the same info, but just fixing this for now.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/395
Fixes Starfield not being able to take photos in photo mode (due to failing to creating windowscodecs' image factory due to COM apartment being initialized). Turns out on Windows RoGetActivationFactory() initializes implicit MTA apartment when called from STA thread, and so after that called once COM is implicitly uninitialized for any (new) thread until COM is uninitialized in the thread which called RoGetActivationFactory (or that thread exited). This is not the case on Win8 (where the function was first introduced) but looks consistent after that.
--
v4: combase: Ensure MTA existence in RoGetActivationFactory().
combase/tests: Add tests for implicit MTA with RoGetActivationFactory().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3806