On 1/8/26 19:56, Michael Tokarev wrote:
For a very large number of syscalls, we have conditional
compilation in linux-user/syscall.c. For example:
#if defined(TARGET_NR_epoll_wait) || defined(TARGET_NR_epoll_pwait)
#if defined(TARGET_NR_epoll_wait)
case TARGET_NR_epoll_wait:
#endif
#if defined(TARGET_NR_epoll_pwait)
case TARGET_NR_epoll_pwait:
#endif
...
#endif
However, there's *no* target without these two syscalls,
and no target without (relatively new) epoll_pwait2 -
these 3 are always defined, for every target.
I stand corrected -- epoll_wait actually isn't always
defined, some targets don't have it. But all have
epoll_pwait. Maybe some future target wont have
epoll_pwait but will only have epoll_pwait2 (so epoll_pwait
is implemented in terms of epoll_pwait2).
But the overall question stands: *all* targets have one
or another (or several) variant from this family - usually
a more generic one and maybe some less generic, but at least
one of them is always present, and it looks like there's no
need to do a lot of this #ifdef'fery.
/mjt