This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix IA-64 pthread signal wrapper


Hi!

IA-64 only recognizes real time style signals, but if SA_SIGINFO
is not passed to sigaction, then pthread sighandler wrapper screws
things up. Either it can be solved the following way, or we could add some
macros to force using rt pthread sighandler wrapper unconditionally on
some arches.
Note that libSegFault.so did not work on IA-64 before this patch and does
not work after it.

2002-07-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: New.
	* sysdeps/unix/sysv/linux/ia64/profil-counter.h: Fix profil_counter
	arguments.

--- libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h.jj	Thu Jul 25 13:52:17 2002
+++ libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h	Thu Jul 25 14:16:04 2002
@@ -0,0 +1,26 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define SIGCONTEXT siginfo_t *_si, struct sigcontext *
+#define SIGCONTEXT_EXTRA_ARGS _si,
+#define GET_PC(ctx)	((void *) 0)
+#define GET_FRAME(ctx)	((void *) 0)
+#define GET_STACK(ctx)	((void *) 0)
+
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
--- libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h.jj	Thu Aug 23 18:51:06 2001
+++ libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h	Thu Jul 25 14:15:20 2002
@@ -21,7 +21,7 @@
    and the interrupted PC is easily findable in the `struct sigcontext'.  */
 
 static void
-profil_counter (int signr, int code, struct sigcontext *scp)
+profil_counter (int signr, siginfo_t *si, struct sigcontext *scp)
 {
   unsigned long ip = scp->sc_ip & ~0X3ULL, slot = scp->sc_ip & 0x3ull;
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]