Why is taskset still not in util-linux?
Mark Geisert
mark@maxrnd.com
Sat Mar 21 08:37:44 GMT 2020
Eliot Moss wrote:
> On 3/20/2020 9:39 AM, Yaakov Selkowitz wrote:
>
> > Cygwin doesn't support syscalls. I'd be very wary of any code which is
> > conditional on any #ifdef SYS_*.
>
> Of course. AFAICT taskset does not need the syscall, it just needs the
> library call to work. Asking about the syscall is, I suppose, a kind of Linux
> shorthand to see if something is supported on the particular platform. Mark's
> suggestion of providing a fake definition of that syscall definition is a
> workaround that may disturb the util-linux sources the least.
What I did here was definitely a hack. I'm not sure it's the best solution.
I fully concur with Yaakov's warning. There's two levels to syscalls as seen in
programs like taskset. On one level, configure checks whether a particular
syscall exists on the compiling machine because different Linux kernels have
different sets of syscalls. On the second level, the program actually uses a
call named syscall() to call into specific kernel routines.
On Cygwin, what to do about programs that assume they're running on Linux and so
make use of the Linux syscall feature? We could dummy up a sys/syscall.h but
implementing a full syscall() interface would be a lot of work and do nothing
but slow down programs making heavy use of it; it adds a layer of indirection.
Yaakov, do you have a general strategy for dealing with syscall usage when
you've come across it in all the porting you've done? Cygwin-specific patch?
..mark
More information about the Cygwin
mailing list