~ubuntu-branches/ubuntu/utopic/eglibc/utopic

« back to all changes in this revision

Viewing changes to sysdeps/unix/sysv/linux/aarch64/nptl/not-cancel.h

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-10-26 05:14:58 UTC
  • mfrom: (1.5.1) (4.4.22 experimental)
  • Revision ID: package-import@ubuntu.com-20121026051458-oryotr4i03ob5pab
Tags: 2.16-0ubuntu1
* Merge with unreleased 2.16 in Debian experimental, remaining changes:
  - Drop the Breaks line from libc6, which refers to a Debian transition
  - Remove the libc6 recommends on libc6-i686, which we don't build
  - Enable libc6{,-dev}-armel on armhf and libc6{-dev}-armhf on armel
  - Ship update-locale and validlocale in /usr/sbin in libc-bin
  - Don't build locales or locales-all in Ubuntu, we rely on langpacks
  - Heavily mangle the way we do service restarting on major upgrades
  - Use different MIN_KERNEL_SUPPORTED versions than Debian, due to
    buildd needs.  This should be universally bumped to 3.2.0 once all
    our buildds (including the PPA guests) are running precise kernels
  - Build i386 variants as -march=i686, build amd64 with -O3, and build
    ppc64 variants (both 64-bit and 32-bit) with -O3 -fno-tree-vectorize
  - Re-enable unsubmitted-ldconfig-cache-abi.diff and rebuild the cache
    on upgrades from previous versions that used a different constant
  - debian/patches/any/local-CVE-2012-3406.diff: switch to malloc when
    array grows too large to handle via alloca extension (CVE-2012-3406)
  - Build generic i386/i686 flavour with -mno-tls-direct-seg-refs
* Changes added/dropped with this merge while reducing our delta:
  - Stop building glibc docs from the eglibc source, and instead make
    the glibc-docs stub have a hard dependency on glibc-doc-reference
  - Remove outdated conflicts against ancient versions of ia32-libs
  - Drop the tzdata dependency from libc6, it's in required and minimal
  - Use gcc-4.7/g++-4.7 by default on all our supported architectures
  - Save our historical changelog as changelog.ubuntu in the source
  - Drop nscd's libaudit build-dep for now, as libaudit is in universe
  - Drop the unnecessary Breaks from libc6 to locales and locales-all
  - Ship xen's ld.so.conf.d snippet as /etc/ld.so.conf.d/libc6-xen.conf
* Disable hard failures on the test suite for the first upload to raring

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Uncancelable versions of cancelable interfaces.  Linux/NPTL version.
 
2
 
 
3
   Copyright (C) 2003, 2006, 2009-2012 Free Software Foundation, Inc.
 
4
 
 
5
   This file is part of the GNU C Library.
 
6
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
7
 
 
8
   The GNU C Library is free software; you can redistribute it and/or
 
9
   modify it under the terms of the GNU Lesser General Public
 
10
   License as published by the Free Software Foundation; either
 
11
   version 2.1 of the License, or (at your option) any later version.
 
12
 
 
13
   The GNU C Library is distributed in the hope that it will be useful,
 
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
   Lesser General Public License for more details.
 
17
 
 
18
   You should have received a copy of the GNU Lesser General Public
 
19
   License along with the GNU C Library; if not, see
 
20
   <http://www.gnu.org/licenses/>.  */
 
21
 
 
22
#include <sysdep.h>
 
23
 
 
24
#define open_not_cancel(name, flags, mode) \
 
25
  INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), (flags), (mode))
 
26
 
 
27
#define open_not_cancel_2(name, flags) \
 
28
  INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags))
 
29
 
 
30
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
 
31
extern int __openat_nocancel (int fd, const char *fname, int oflag,
 
32
                                mode_t mode) attribute_hidden;
 
33
extern int __openat64_nocancel (int fd, const char *fname, int oflag,
 
34
                                  mode_t mode) attribute_hidden;
 
35
#else
 
36
# define __openat_nocancel(fd, fname, oflag, mode) \
 
37
  openat (fd, fname, oflag, mode)
 
38
# define __openat64_nocancel(fd, fname, oflag, mode) \
 
39
  openat64 (fd, fname, oflag, mode)
 
40
#endif
 
41
 
 
42
/* Uncancelable openat.  */
 
43
#define openat_not_cancel(fd, fname, oflag, mode) \
 
44
  __openat_nocancel (fd, fname, oflag, mode)
 
45
#define openat_not_cancel_3(fd, fname, oflag) \
 
46
  __openat_nocancel (fd, fname, oflag, 0)
 
47
#define openat64_not_cancel(fd, fname, oflag, mode) \
 
48
  __openat64_nocancel (fd, fname, oflag, mode)
 
49
#define openat64_not_cancel_3(fd, fname, oflag) \
 
50
  __openat64_nocancel (fd, fname, oflag, 0)
 
51
 
 
52
/* Uncancelable close.  */
 
53
#define close_not_cancel(fd) \
 
54
  INLINE_SYSCALL (close, 1, fd)
 
55
#define close_not_cancel_no_status(fd) \
 
56
  (void) ({ INTERNAL_SYSCALL_DECL (err);                                      \
 
57
            INTERNAL_SYSCALL (close, err, 1, (fd)); })
 
58
 
 
59
/* Uncancelable read.  */
 
60
#define read_not_cancel(fd, buf, n) \
 
61
  INLINE_SYSCALL (read, 3, (fd), (buf), (n))
 
62
 
 
63
/* Uncancelable write.  */
 
64
#define write_not_cancel(fd, buf, n) \
 
65
  INLINE_SYSCALL (write, 3, (fd), (buf), (n))
 
66
 
 
67
/* Uncancelable writev.  */
 
68
#define writev_not_cancel_no_status(fd, iov, n) \
 
69
  (void) ({ INTERNAL_SYSCALL_DECL (err);                                      \
 
70
            INTERNAL_SYSCALL (writev, err, 3, (fd), (iov), (n)); })
 
71
 
 
72
/* Uncancelable fcntl.  */
 
73
#define fcntl_not_cancel(fd, cmd, val) \
 
74
  __fcntl_nocancel (fd, cmd, val)
 
75
 
 
76
/* Uncancelable waitpid.  */
 
77
#ifdef __NR_waitpid
 
78
# define waitpid_not_cancel(pid, stat_loc, options) \
 
79
  INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options)
 
80
#else
 
81
# define waitpid_not_cancel(pid, stat_loc, options) \
 
82
  INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
 
83
#endif
 
84
 
 
85
/* Uncancelable pause.  */
 
86
#ifdef __NR_pause
 
87
# define pause_not_cancel() \
 
88
  INLINE_SYSCALL (pause, 0)
 
89
#else
 
90
# define pause_not_cancel() \
 
91
  __pause_nocancel ()
 
92
#endif
 
93
 
 
94
/* Uncancelable nanosleep.  */
 
95
#ifdef __NR_nanosleep
 
96
# define nanosleep_not_cancel(requested_time, remaining) \
 
97
  INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
 
98
#else
 
99
# define nanosleep_not_cancel(requested_time, remaining) \
 
100
  __nanosleep_nocancel (requested_time, remaining)
 
101
#endif
 
102
 
 
103
/* Uncancelable sigsuspend.  */
 
104
#define sigsuspend_not_cancel(set) \
 
105
  __sigsuspend_nocancel (set)