source: patches/glibc-2.5-sparc_fixes-1.patch@ 9717098

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 9717098 was 7707cfa, checked in by Jim Gifford <clfs@…>, 18 years ago

Glibc 2.5 Patches

  • Property mode set to 100644
File size: 2.5 KB
  • sysdeps/unix/sysv/linux/sparc/sparc64/pause.c

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2006-09-30
    Initial Package Version: 2.5
    Origin: Jakub Jelinek
    Upstream Status: Applied
    Description: Fixes for Sparc architecture
    	Fixes Missing Reference to __sigprocmask
    
    diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
    old new  
    1 #include <sysdeps/posix/pause.c>
     1/* pause -- suspend the process until a signal arrives.  POSIX.1 version.
     2   Copyright (C) 2003 Free Software Foundation, Inc.
     3   This file is part of the GNU C Library.
     4
     5   The GNU C Library is free software; you can redistribute it and/or
     6   modify it under the terms of the GNU Lesser General Public
     7   License as published by the Free Software Foundation; either
     8   version 2.1 of the License, or (at your option) any later version.
     9
     10   The GNU C Library is distributed in the hope that it will be useful,
     11   but WITHOUT ANY WARRANTY; without even the implied warranty of
     12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13   Lesser General Public License for more details.
     14
     15   You should have received a copy of the GNU Lesser General Public
     16   License along with the GNU C Library; if not, write to the Free
     17   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     18   02111-1307 USA.  */
     19
     20#include <errno.h>
     21#include <signal.h>
     22#include <unistd.h>
     23#include <sysdep-cancel.h>
     24
     25#include <sysdep.h>
     26#include <sys/syscall.h>
     27#include <bp-checks.h>
     28
     29/* Suspend the process until a signal arrives.
     30   This always returns -1 and sets errno to EINTR.  */
     31int
     32__libc_pause (void)
     33{
     34  sigset_t set;
     35
     36  __sigemptyset (&set);
     37  INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, CHECK_SIGSET (NULL),
     38                  CHECK_SIGSET_NULL_OK (&set), _NSIG / 8);
     39
     40  /* pause is a cancellation point, but so is sigsuspend.
     41     So no need for anything special here.  */
     42
     43  return __sigsuspend (&set);
     44}
     45weak_alias (__libc_pause, pause)
     46
     47LIBC_CANCEL_HANDLED ();         /* sigsuspend handles our cancellation.  */
     48
     49int
     50__pause_nocancel (void)
     51{
     52  sigset_t set;
     53
     54  __sigemptyset (&set);
     55  INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, CHECK_SIGSET (NULL),
     56                  CHECK_SIGSET_NULL_OK (&set), _NSIG / 8);
     57  return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (&set), _NSIG / 8);
     58}
     59
Note: See TracBrowser for help on using the repository browser.