This is the mail archive of the libc-alpha@sourceware.org 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 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.

-- 
Joseph S. Myers
joseph@codesourcery.com


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