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 sparc64 build
Date: Thu, 10 Aug 2006 06:53:00 -0000	[thread overview]
Message-ID: <20060810065324.GG4556@sunsite.mff.cuni.cz> (raw)

Hi!

sparc64 doesn't provide the pause syscall, so it is emulated
using sigsuspend.
The following adds __pause_nocancel, which is now required by
pthread_mutex_lock.c.

2006-08-09  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
	(__pause_nocancel): New function.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c	14 Apr 2005 21:44:25 -0000	1.3
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c	9 Aug 2006 19:32:11 -0000
@@ -1,5 +1,5 @@
 /* pause -- suspend the process until a signal arrives.  POSIX.1 version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 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
@@ -44,4 +44,15 @@ __libc_pause (void)
 }
 weak_alias (__libc_pause, pause)
 
+int
+__pause_nocancel (void)
+{
+  sigset_t set;
+
+  __sigemptyset (&set);
+  INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, CHECK_SIGSET (NULL),
+		  CHECK_SIGSET_NULL_OK (&set), _NSIG / 8);
+  return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (&set), _NSIG / 8);
+}
+
 LIBC_CANCEL_HANDLED ();		/* sigsuspend handles our cancellation.  */

	Jakub

             reply	other threads:[~2006-08-10  6:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10  6:53 Jakub Jelinek [this message]
2006-08-10 20:56 ` Roland McGrath
2006-08-15  5:28   ` Ulrich Drepper
  -- strict thread matches above, loose matches on Subject: below --
2006-03-01 21:19 Jakub Jelinek
2006-01-31 21:59 Jakub Jelinek
2003-04-14 13:36 Jakub Jelinek
2003-04-14 16:49 ` Ulrich Drepper
2002-09-29 13:28 Jakub Jelinek
2002-09-29 13: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=20060810065324.GG4556@sunsite.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).