From: Arnd Bergmann <arnd@arndb.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: liqin.chen@sunplusct.com, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org
Subject: Re: [PATCH 5/13] score - New architecure port to SunplusCT S+CORE processor
Date: Fri, 27 Mar 2009 20:19:53 +0100 [thread overview]
Message-ID: <200903272019.53689.arnd@arndb.de> (raw)
In-Reply-To: <20090327184013.GB21149@uranus.ravnborg.org>
On Friday 27 March 2009, Sam Ravnborg wrote:
> > +struct shmid64_ds {
> > + struct ipc64_perm shm_perm; /* operation perms */
> > + size_t shm_segsz; /* size of segment (bytes)
> > */
> > + __kernel_time_t shm_atime; /* last attach time */
> > + __kernel_time_t shm_dtime; /* last detach time */
> > + __kernel_time_t shm_ctime; /* last change time */
> > + __kernel_pid_t shm_cpid; /* pid of creator */
> > + __kernel_pid_t shm_lpid; /* pid of last operator */
> > + unsigned long shm_nattch; /* no. of current attaches
> > */
> > + unsigned long __unused1;
> > + unsigned long __unused2;
> > +};
>
> This is an exported header and you mix wide specific and generic types.
> The recommended way is to stick to the __[u]{32,64}int versions + the kernel
> specific types as __kernel_pid_t.
> In other words avoid use of int, long etc in your exported headers.
>
This is correct in general, but in this particular case (SysV IPC) it is
exactly what most of the other architectures do. It's basically impossible
to get this right, so simply doing the same as x86 is the best option
I found (unlike most of the other headers).
Arnd <><
next prev parent reply other threads:[~2009-03-27 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 1:37 [PATCH 5/13] score - New architecure port to SunplusCT S+CORE processor liqin.chen
2009-03-27 18:40 ` Sam Ravnborg
2009-03-27 19:19 ` Arnd Bergmann [this message]
2009-03-27 20:26 ` Sam Ravnborg
2009-03-27 20:53 ` Arnd Bergmann
2009-03-27 21:22 ` Sam Ravnborg
2009-03-29 13:46 ` Michal Simek
2009-03-30 2:25 ` liqin.chen
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=200903272019.53689.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liqin.chen@sunplusct.com \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/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