On Wed Apr 2 05:46:00 2025 +0000, Brendan Shanks wrote:
changed this line in [version 7 of the diff](/wine/wine/-/merge_requests/6866/diffs?diff_id=168023&start_sha=d2ebef1897b4089462d63bfdb20bae06058bc4bb#253a5ed0bf568582a6c96df257e6e01fe7220931_2873_2878)
I looked into it more and the syscall (`0x3000003`/`thread_fast_set_cthread_self64`) has actually existed with the same number for the entire life of x86_64 macOS, even if the higher-level thunks have changed over time. Searching for the number on GitHub even turns up a few obscure uses (including a [Wine fork](https://github.com/crioux/wine64-darwin) doing GS thunking 11 years ago!). The machdep syscalls have changed very little over time: only 4 added since 2007, and `thread_fast_set_cthread_self64` always kept the same number.
In all, it seems unlikely that the syscall number will change at this point (especially given that Intel macOS is essentially in maintenance mode). I don't really want to go down the path of trying to extract the number or depending on the machine code of `thread_set_tsd_base`.