public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix IA-64 pthread signal wrapper
Date: Thu, 25 Jul 2002 05:07:00 -0000	[thread overview]
Message-ID: <20020725140716.U20867@sunsite.ms.mff.cuni.cz> (raw)

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

             reply	other threads:[~2002-07-25 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25  5:07 Jakub Jelinek [this message]
2002-07-27  1:42 ` Ulrich Drepper

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=20020725140716.U20867@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).