alpha: Add missing definitions in resource.h, shm.h
[glibc-ports.git] / sysdeps / unix / sysv / linux / alpha / sysdep.h
blob329fdbd082ed0c39212a3bee227e7b37a8a811d7
1 /* Copyright (C) 1992-2012 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
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.
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.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _LINUX_ALPHA_SYSDEP_H
20 #define _LINUX_ALPHA_SYSDEP_H 1
22 #ifdef __ASSEMBLER__
23 #include <asm/pal.h>
24 #include <alpha/regdef.h>
25 #endif
27 /* There is some commonality. */
28 #include <sysdeps/unix/alpha/sysdep.h>
30 #include <tls.h>
32 /* For Linux we can use the system call table in the header file
33 /usr/include/asm/unistd.h
34 of the kernel. But these symbols do not follow the SYS_* syntax
35 so we have to redefine the `SYS_ify' macro here. */
36 #undef SYS_ify
37 #define SYS_ify(syscall_name) __NR_##syscall_name
39 /* Define some aliases to make automatic syscall generation work
40 properly. The SYS_* variants are for the benefit of the files in
41 sysdeps/unix. */
42 #define __NR_getpid __NR_getxpid
43 #define __NR_getuid __NR_getxuid
44 #define __NR_getgid __NR_getxgid
45 #define SYS_getpid __NR_getxpid
46 #define SYS_getuid __NR_getxuid
47 #define SYS_getgid __NR_getxgid
50 * Some syscalls no Linux program should know about:
52 #define __NR_osf_sigprocmask 48
53 #define __NR_osf_shmat 209
54 #define __NR_osf_getsysinfo 256
55 #define __NR_osf_setsysinfo 257
57 /* Help old kernel headers where particular syscalls are not available. */
58 #ifndef __NR_semtimedop
59 # define __NR_semtimedop 423
60 #endif
62 /* This is a kludge to make syscalls.list find these under the names
63 pread and pwrite, since some kernel headers define those names
64 and some define the *64 names for the same system calls. */
65 #if !defined __NR_pread && defined __NR_pread64
66 # define __NR_pread __NR_pread64
67 #endif
68 #if !defined __NR_pwrite && defined __NR_pwrite64
69 # define __NR_pwrite __NR_pwrite64
70 #endif
73 * In order to get the hidden arguments for rt_sigaction set up
74 * properly, we need to call the assembly version. This shouldn't
75 * happen except for inside sigaction.c, where we handle this
76 * specially. Catch other uses and error.
79 #undef INLINE_SYSCALL
80 #define INLINE_SYSCALL(name, nr, args...) \
81 ({ \
82 extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
83 __attribute__((unused)); \
84 INLINE_SYSCALL1(name, nr, args); \
87 #undef INTERNAL_SYSCALL
88 #define INTERNAL_SYSCALL(name, err_out, nr, args...) \
89 ({ \
90 extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
91 __attribute__((unused)); \
92 INTERNAL_SYSCALL1(name, err_out, nr, args); \
95 #endif /* _LINUX_ALPHA_SYSDEP_H */