[PATCH v2] handle sem_t with ILP32 and __HAVE_64B_ATOMICS
Chris Metcalf
cmetcalf@ezchip.com
Wed Jan 28 19:08:00 GMT 2015
On 1/28/2015 4:04 AM, Torvald Riegel wrote:
> I thing using to_new_sem in all cases is cleaner, but my comment on the
> union wasn't quite right. I agree the union should give the proper
> alignment, because it includes struct new_sem directly, so will pick up
> the uint64_t alignment of it.
I have reverted the code to just using the union, which on balance I
think I slightly prefer. I think mentioning to_new_sem() in the comment
as part of the explanation is a sufficient way to deal with this.
+ /* Create the initial file content. The union forces the
+ alignment of initsem to be at least as much as newsem.
+ When to_new_sem() provides for varying internal alignment,
+ this expression makes the alignment zero, and matches the
+ eventual alignment when the union is copied to the start of
+ an mmap'ed file page. */
--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com
More information about the Libc-alpha
mailing list