~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Procedure definition for FE_MASK_ENV for Linux/ppc.
2
 
   Copyright (C) 2007 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2012 Free Software Foundation, Inc.
3
3
   This file is part of the GNU C Library.
4
4
 
5
5
   The GNU C Library is free software; you can redistribute it and/or
24
24
#include <sys/prctl.h>
25
25
#include <kernel-features.h>
26
26
 
27
 
#if __ASSUME_NEW_PRCTL_SYSCALL == 0
28
 
/* This is rather fiddly under Linux.  We don't have direct access,
29
 
   and there is no system call, but we can change the bits
30
 
   in a signal handler's context...  */
31
 
 
32
 
static struct sigaction oact;
33
 
 
34
 
static void
35
 
fe_mask_handler (int signum, struct sigcontext *sc)
36
 
{
37
 
  sc->regs->msr &= ~0x900ul;  /* FE0 | FE1 */
38
 
  sigaction (SIGUSR1, &oact, NULL);
39
 
}
40
 
#endif
41
 
 
42
27
const fenv_t *
43
28
__fe_mask_env (void)
44
29
{
45
 
#if __ASSUME_NEW_PRCTL_SYSCALL == 0
46
 
# if defined PR_SET_FPEXC && defined PR_FP_EXC_DISABLED
47
 
  int result = INLINE_SYSCALL (prctl, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
48
 
 
49
 
  if (result == -1 && errno == EINVAL)
50
 
# endif
51
 
    {
52
 
      struct sigaction act;
53
 
 
54
 
      act.sa_handler = (sighandler_t) fe_mask_handler;
55
 
      sigemptyset (&act.sa_mask);
56
 
      act.sa_flags = 0;
57
 
 
58
 
      sigaction (SIGUSR1, &act, &oact);
59
 
      raise (SIGUSR1);
60
 
    }
61
 
#else
62
30
  INTERNAL_SYSCALL_DECL (err);
63
31
  INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
64
 
#endif
65
32
 
66
33
  return FE_DFL_ENV;
67
34
}