public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix IA-64 pthread signal wrapper
@ 2002-07-25  5:07 Jakub Jelinek
  2002-07-27  1:42 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2002-07-25  5:07 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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

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

* Re: [PATCH] Fix IA-64 pthread signal wrapper
  2002-07-25  5:07 [PATCH] Fix IA-64 pthread signal wrapper Jakub Jelinek
@ 2002-07-27  1:42 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2002-07-27  1:42 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

Jakub Jelinek wrote:

> IA-64 only recognizes real time style signals, but if SA_SIGINFO
> is not passed to sigaction, then pthread sighandler wrapper screws
> things up.

I've applied the patch.  Thanks,

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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

end of thread, other threads:[~2002-07-27  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-25  5:07 [PATCH] Fix IA-64 pthread signal wrapper Jakub Jelinek
2002-07-27  1:42 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).