Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268390AbTGIPmJ (ORCPT ); Wed, 9 Jul 2003 11:42:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268396AbTGIPmJ (ORCPT ); Wed, 9 Jul 2003 11:42:09 -0400 Received: from rwcrmhc12.comcast.net ([216.148.227.85]:469 "EHLO rwcrmhc12.comcast.net") by vger.kernel.org with ESMTP id S268390AbTGIPll (ORCPT ); Wed, 9 Jul 2003 11:41:41 -0400 Message-ID: <3F0C3F32.40301@kegel.com> Date: Wed, 09 Jul 2003 09:13:38 -0700 From: Dan Kegel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: de-de, en MIME-Version: 1.0 To: "Luck, Tony" CC: Mikulas Patocka , "Chen, Kenneth W" , Linux Kernel Mailing List , linux-aio@kvack.org Subject: Re: Redundant memset in AIO read_events References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 954 Lines: 29 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! There might be some architecture that requires 16 byte alignment... how about surrounding the memcpy with if (sizeof(struct io_event) != 4 * sizeof(__u64)) ? -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/