From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdhuK-0000um-2T for qemu-devel@nongnu.org; Tue, 05 Nov 2013 09:47:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdhuE-0000mQ-JM for qemu-devel@nongnu.org; Tue, 05 Nov 2013 09:47:04 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:56636 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdhuE-0000mL-Df for qemu-devel@nongnu.org; Tue, 05 Nov 2013 09:46:58 -0500 References: <1383140792-111139-1-git-send-email-petar.jovanovic@rt-rk.com> <56EA75BA695AE044ACFB41322F6D2BF44CCAB923@BADAG02.ba.imgtec.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <56EA75BA695AE044ACFB41322F6D2BF44CCAB923@BADAG02.ba.imgtec.org> Date: Tue, 05 Nov 2013 14:46:52 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 1/2] linux-user: create target_structsheader to place ipc_perm and shmid_dss List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Petar Jovanovic Cc: "peter.maydell@linaro.org" , "riku.voipio@linaro.org" , Petar Jovanovic , "qemu-devel@nongnu.org" , "afaerber@suse.de" , "aurelien@aurel32.net" Petar.Jovanovic@imgtec.com writes: > ________________________________________ > From: Alex Bennée [alex.bennee@linaro.org] > >> There is an awful lot of similarity between a lot of the structures >> while not being totally identical. Given the syscall munging is common >> is there not an argument for having a common header for this case? > > Hi Alex, > > I am not sure I understand your point. This used to be all in one file, now > it is divided in arch-specific files that can be later populated with other > target specific struct definitions. This was also suggested in the first > review a month ago. I've looked back and I can see the point of moving it out of the syscall.c into the appropriate linux-user/${foo}/target_structs.h. However for the cases where the given structure is identical maybe linux-user/${foo}/target_structs.h should do an: #include Having essentially the same definition in multiple places makes common fixes potentially miss architectures. If a given architecture then needs it's own special snowflake version it can of course not include the common version and define it directly in target_structs.h. Where is the reference for each of these structures? The kernels own headers or glibc's for the appropriate arch? -- Alex Bennée