From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Muli Ben-Yehuda <mulix@actcom.co.il>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: weird padding in linux/timex.h, struct timex
Date: 06 Aug 2002 14:36:04 +0100 [thread overview]
Message-ID: <1028640964.18130.145.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <20020806111549.GL29139@alhambra.actcom.co.il>
On Tue, 2002-08-06 at 12:15, Muli Ben-Yehuda wrote:
> Hi,
>
> struct timex in include/linux/timex.h is defined as
>
> struct timex
> {
> ...
> int :32; int :32; int :32; int :32;
> int :32; int :32; int :32; int :32;
> int :32; int :32; int :32; int :32;
> };
>
> I assume that this is used as padding. Is there any reason for using
> bitfields as padding? If there is, a comment to that effect would be
> nice. If there isn't, the following patch makes the padding explicit.
>
That is how the interface has always been defined. I think we inherited
that from the world of xntpd but I may be wrong. Your __pad is not
always the same thing - you assume 4 byte ints and ints aligned the same
way as char [], which may not always be true.
next prev parent reply other threads:[~2002-08-06 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-06 11:15 Muli Ben-Yehuda
2002-08-06 13:36 ` Alan Cox [this message]
2002-08-06 12:52 ` Muli Ben-Yehuda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1028640964.18130.145.camel@irongate.swansea.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mulix@actcom.co.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®