public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* si_band
       [not found] ` <Pine.LNX.4.58.0404021759430.1122@ppc970.osdl.org>
@ 2004-04-03  4:21   ` Linus Torvalds
  2004-04-03  7:27     ` si_band David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2004-04-03  4:21 UTC (permalink / raw)
  To: David S. Miller; +Cc: Andrew Morton, Benjamin Herrenschmidt, linux-arch


David, 
 are you happy with this diff? I not only reverted the __ARCH_SI_BAND_T 
removal, I also added a comment on why it exists in the first place, and 
why the default changed to "long".

Architecture maintainers - what other 64-bit architectures will want to
add the __ARCH_SI_BAND_T define to "int"? ppc64 and x86-64 both want the
default "long", and I haven't checked the others.

		Linus

----
===== include/asm-generic/siginfo.h 1.12 vs edited =====
--- 1.12/include/asm-generic/siginfo.h	Thu Apr  1 11:46:43 2004
+++ edited/include/asm-generic/siginfo.h	Fri Apr  2 20:17:48 2004
@@ -26,6 +26,15 @@
 #define __ARCH_SI_UID_T	uid_t
 #endif
 
+/*
+ * The default "si_band" type is "long", as specified by POSIX.
+ * However, some architectures want to override this to "int"
+ * for historical compatibility reasons, so we allow that.
+ */
+#ifndef __ARCH_SI_BAND_T
+#define __ARCH_SI_BAND_T long
+#endif
+
 #ifndef HAVE_ARCH_SIGINFO_T
 
 typedef struct siginfo {
@@ -77,7 +86,7 @@
 
 		/* SIGPOLL */
 		struct {
-			long _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
+			__ARCH_SI_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
 			int _fd;
 		} _sigpoll;
 	} _sifields;
===== include/asm-sparc64/siginfo.h 1.12 vs edited =====
--- 1.12/include/asm-sparc64/siginfo.h	Thu Aug 28 01:31:51 2003
+++ edited/include/asm-sparc64/siginfo.h	Fri Apr  2 20:16:14 2004
@@ -8,6 +8,7 @@
 
 #define __ARCH_SI_PREAMBLE_SIZE	(4 * sizeof(int))
 #define __ARCH_SI_TRAPNO
+#define __ARCH_SI_BAND_T int
 
 #include <asm-generic/siginfo.h>
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: si_band
  2004-04-03  4:21   ` si_band Linus Torvalds
@ 2004-04-03  7:27     ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-04-03  7:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: akpm, benh, linux-arch

On Fri, 2 Apr 2004 20:21:08 -0800 (PST)
Linus Torvalds <torvalds@osdl.org> wrote:

>  are you happy with this diff? I not only reverted the __ARCH_SI_BAND_T 
> removal, I also added a comment on why it exists in the first place, and 
> why the default changed to "long".

I'm totally fine with this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-03  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040402161321.2d4e754c.davem@redhat.com>
     [not found] ` <Pine.LNX.4.58.0404021759430.1122@ppc970.osdl.org>
2004-04-03  4:21   ` si_band Linus Torvalds
2004-04-03  7:27     ` si_band David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox