All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Kegel <dank@kegel.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
	"Chen, Kenneth W" <kenneth.w.chen@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-aio@kvack.org
Subject: Re: Redundant memset in AIO read_events
Date: Wed, 09 Jul 2003 09:13:38 -0700	[thread overview]
Message-ID: <3F0C3F32.40301@kegel.com> (raw)
In-Reply-To: <DD755978BA8283409FB0087C39132BD101B00F79@fmsmsx404.fm.intel.com>

Luck, Tony wrote:
> That is true, but here's the definition of the io_event strcuture:
> 
> struct io_event {
>         __u64           data;
>         __u64           obj;
>         __s64           res;
>         __s64           res2;
> };
> 
> In the words of the comment, C may be "fun", but I've
> having trouble envisioning an architecture where a structure
> that consists of four equal sized objects has some padding!

<newbie>
There might be some architecture that requires 16 byte alignment...
how about surrounding the memcpy with if (sizeof(struct io_event) != 4 * sizeof(__u64)) ?
</newbie>

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


  reply	other threads:[~2003-07-09 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09 15:43 Redundant memset in AIO read_events Luck, Tony
2003-07-09 16:13 ` Dan Kegel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-09 22:43 Chen, Kenneth W
2003-07-09 22:41 Chen, Kenneth W
2003-07-08 23:17 Chen, Kenneth W
2003-07-09 12:55 ` Mikulas Patocka

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=3F0C3F32.40301@kegel.com \
    --to=dank@kegel.com \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=tony.luck@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.