|
From: David G. <dga...@gm...> - 2018-04-19 15:05:52
|
2018-04-19 11:15 GMT+02:00 Thorsten Otto <ad...@th...>:
> On Donnerstag, 19. April 2018 10:10:33 CEST David Gálvez wrote:
>> I've seen that sigmask is in a different position only in Linux-m68k
>> kernel headers files, but in glibc and NetBSD
>> is in the same location than in MiNTlib:
>
> But the installed header file is machine dependent (it's a copy of sysdeps/
> unix/sysv/linux/{arch}/sys/ucontext.h from the source archive), and the one
> you are quoting there is not the one used for linux/m68k.
>
Yes, you're right, I missed the Linux specific ucontext.h file in the
GNU C lib sources.
The one I linked here it was machine dependent too
"sysdeps/m68k/sys/ucontext.h",
but of course not what the glibc is installing in Linux-m68k.
I've also seen that the "generic" glibc ucontext struct in
"sysdeps/generic/sys" also
moved the sigmask to the end of the struct.
>>Do you have in mind an example
>>of a possible situation where having the registers
>>in different positions in the struct would affect portability.
>
> My goal would be to actually implement that functionality, both in the library
> and in the kernel. Actually i think it does not matter much how the structure
> is actually implemented, but it would make sense to use the same structure for
> both, so that the library does not have to make a copy of it. And for that it
> should be defined in a way that future enhancements are easier (e.g. more than
> 32 signals numbers).
>
I think that makes sense.
|