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 common bits/shm.h for more architectures



On 09/10/2018 18:10, Joseph Myers wrote:
> sysdeps/unix/sysv/linux/bits/shm.h has padding after time fields in
> struct shmid_ds unconditionally, and thus is only suitable for 32-bit
> architectures (no 64-bit configurations use this file);
> sysdeps/unix/sysv/linux/generic/bits/shm.h is substantively the same,
> except that the padding is conditioned on __WORDSIZE == 32, and so it
> can be used for 64-bit architectures as well.
> 
> This patch adds the conditionals to
> sysdeps/unix/sysv/linux/bits/shm.h.  The linux/generic/ version is
> then no longer needed and so is removed, as are the alpha and s390
> versions which are also no longer needed.  The other
> architecture-specific versions have different padding, layout, types
> or SHMLBA definitions and so are still needed after this change.
> 
> This is essentially the same change for bits/shm.h as the bits/msq.h
> patch <https://sourceware.org/ml/libc-alpha/2018-10/msg00092.html> and
> the bits/sem.h patch
> <https://sourceware.org/ml/libc-alpha/2018-10/msg00108.html> (both
> pending review; there is no dependency on those patches).  However,
> the details of the padding variations for the architectures that
> aren't changed are not all the same between msqid_ds, shmid_ds and
> semid_ds.
> 
> Tested with build-many-glibcs.py.
> 
> 2018-10-08  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/unix/sysv/linux/bits/shm.h: Include <bits/wordsize.h>.
> 	(struct shmid_ds): Condition padding after time fields on
> 	[__WORDSIZE == 32].
> 	* sysdeps/unix/sysv/linux/alpha/bits/shm.h: Remove file.
> 	* sysdeps/unix/sysv/linux/generic/bits/shm.h: Likewise.
> 	* sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise.

LGTM, thanks.


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