This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use single bits/sem.h for all architectures

On 15/10/2018 12:18, Joseph Myers wrote:
> On Mon, 15 Oct 2018, Adhemerval Zanella wrote:
>> Since we currently we pass the user-defined semid_ds directly to kernel on
>> semctl, I think it is worth to add generic Linux UAPI expects news ports to
>> follow kernel semid64_ds layout:
> How about "This must match the layout used for struct semid64_ds in 
> <asm/sembuf.h>, as glibc does not do layout conversions for this 
> structure." (which accurately reflects the requirements, without 
> duplicating information about what those requirements are).


>> I think also we should comment that if ABI uses a different type than
>> unsigned long for __syscall_ulong_t it should re-define semid_ds.
> No, the whole point of using __syscall_ulong_t here is to avoid needing 
> such a redefinition for ABIs using a different __syscall_ulong_t 
> (currently just x32), provided __syscall_ulong_t indeed reflects the ABI 
> in this case.  It's generally the case for every structure definition that 
> if a new kernel port somehow does things differently from every previous 
> port then some definitions in glibc may need to change for that port 
> (hopefully without duplicating too much); I don't think it's appropriate 
> to add a comment about that to this code.

Alright, my thinking was indeed to warn the ABI where __syscall_ulong might 
not reflect the ABI (but it also seems the case when kernel does try to
avoid now).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]