diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-06-05 23:04:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-17 21:41:42 -0700 |
commit | 100b10d752bafafda2a508235b7df6718e42bd76 (patch) | |
tree | 5c45cb08f25698bd2292b107d5fa2832878b4ab5 /include/asm-sparc | |
parent | 6d1f4b88ee73c9a073277dd1529fbbce356e04e8 (diff) |
sparc: Merge asm-sparc{,64}/msgbuf.h
Padding from 32 bit sparc kept using preprocessor magic
:$ diff -u include/asm-sparc/msgbuf.h include/asm-sparc64/msgbuf.h
:-- include/asm-sparc/msgbuf.h 2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/msgbuf.h 2008-06-13 06:42:07.000000000 +0200
:@@ -7,17 +7,13 @@
: * between kernel and user space.
: *
: * Pad space is left for:
:- * - 64-bit time_t to solve y2038 problem
:- * - 2 miscellaneous 32-bit values
:+ * - 2 miscellaneous 64-bit values
: */
:
: struct msqid64_ds {
: struct ipc64_perm msg_perm;
:- unsigned int __pad1;
: __kernel_time_t msg_stime; /* last msgsnd time */
:- unsigned int __pad2;
: __kernel_time_t msg_rtime; /* last msgrcv time */
:- unsigned int __pad3;
: __kernel_time_t msg_ctime; /* last change time */
: unsigned long msg_cbytes; /* current number of bytes on queue */
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/msgbuf.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/asm-sparc/msgbuf.h b/include/asm-sparc/msgbuf.h index 8cec9ad0b825..efc7cbe9788f 100644 --- a/include/asm-sparc/msgbuf.h +++ b/include/asm-sparc/msgbuf.h @@ -1,7 +1,7 @@ -#ifndef _SPARC64_MSGBUF_H -#define _SPARC64_MSGBUF_H +#ifndef _SPARC_MSGBUF_H +#define _SPARC_MSGBUF_H -/* +/* * The msqid64_ds structure for sparc64 architecture. * Note extra padding because this structure is passed back and forth * between kernel and user space. @@ -11,13 +11,20 @@ * - 2 miscellaneous 32-bit values */ +#if defined(__sparc__) && defined(__arch64__) +# define PADDING(x) +#else +# define PADDING(x) unsigned int x; +#endif + + struct msqid64_ds { struct ipc64_perm msg_perm; - unsigned int __pad1; + PADDING(__pad1) __kernel_time_t msg_stime; /* last msgsnd time */ - unsigned int __pad2; + PADDING(__pad2) __kernel_time_t msg_rtime; /* last msgrcv time */ - unsigned int __pad3; + PADDING(__pad3) __kernel_time_t msg_ctime; /* last change time */ unsigned long msg_cbytes; /* current number of bytes on queue */ unsigned long msg_qnum; /* number of messages in queue */ @@ -27,5 +34,5 @@ struct msqid64_ds { unsigned long __unused1; unsigned long __unused2; }; - -#endif /* _SPARC64_MSGBUF_H */ +#undef PADDING +#endif /* _SPARC_MSGBUF_H */ |