blob: 061b36e586d23f2cf082bab14069beb89f8213d4 [file] [log] [blame]
sewardj4eee4762006-10-14 15:51:32 +00001
2/*--------------------------------------------------------------------*/
njnf11335a2009-05-20 04:09:38 +00003/*--- Syscall numbers and related operations. pub_tool_vkiscnums.h ---*/
sewardj4eee4762006-10-14 15:51:32 +00004/*--------------------------------------------------------------------*/
5
6/*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
9
njn9f207462009-03-10 22:02:09 +000010 Copyright (C) 2005-2009 Nicholas Nethercote
sewardj4eee4762006-10-14 15:51:32 +000011 njn@valgrind.org
njn9f207462009-03-10 22:02:09 +000012 Copyright (C) 2006-2009 OpenWorks LLP
sewardj4eee4762006-10-14 15:51:32 +000013 info@open-works.co.uk
14
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License as
17 published by the Free Software Foundation; either version 2 of the
18 License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
28 02111-1307, USA.
29
30 The GNU General Public License is contained in the file COPYING.
31*/
32
33/* This file defines the system call numbers.
34
35 On Linux they are a bunch of #define'd constants of the form
36 __NR_name, and this file must contain nothing else, since it will
37 be included in assembly code (m_trampoline.S).
38
39 On AIX the __NR_name consts are renamings of global variables which
40 tell us the number for each syscall. This elaboration is necessary
41 because on AIX the syscall numbers are not constant; they can be
42 different for each process (in principle; in practice they rarely
43 change). 32- and 64-bit AIX5 share a common "implementation".
44
45 This file is merely a top-level "steering" file, which pulls in the
46 correct bits for the relevant platform. You should not directly
47 #include any file in include/vki; instead #include only this one or
48 pub_core_vkiscnums.h.
49*/
50
51#ifndef __PUB_TOOL_VKISCNUMS_H
52#define __PUB_TOOL_VKISCNUMS_H
53
54#if defined(VGP_x86_linux)
55# include "vki/vki-scnums-x86-linux.h"
sewardj9c606bd2008-09-18 18:12:50 +000056
sewardj4eee4762006-10-14 15:51:32 +000057#elif defined(VGP_amd64_linux)
58# include "vki/vki-scnums-amd64-linux.h"
sewardj9c606bd2008-09-18 18:12:50 +000059
sewardj4eee4762006-10-14 15:51:32 +000060#elif defined(VGP_ppc32_linux)
61# include "vki/vki-scnums-ppc32-linux.h"
sewardj9c606bd2008-09-18 18:12:50 +000062
sewardj4eee4762006-10-14 15:51:32 +000063#elif defined(VGP_ppc64_linux)
64# include "vki/vki-scnums-ppc64-linux.h"
sewardj9c606bd2008-09-18 18:12:50 +000065
sewardj4eee4762006-10-14 15:51:32 +000066#elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
67# include "vki/vki-scnums-aix5.h"
sewardj9c606bd2008-09-18 18:12:50 +000068
69/* Make it possible to include this file in assembly sources. */
70#if !defined(VG_IN_ASSEMBLY_SOURCE)
71
72/* Look up the name of a syscall, using the bindings previously
73 created by VG_(aix5_register_syscall), for the purposes of making
74 error messages. */
75extern UChar* VG_(aix5_sysno_to_sysname)( Int sysno );
76
77#endif /* !defined(VG_IN_ASSEMBLY_SOURCE) */
78
sewardj4eee4762006-10-14 15:51:32 +000079#else
80# error Unknown platform
81#endif
82
83#endif // __PUB_TOOL_VKISCNUMS_H
84
85/*--------------------------------------------------------------------*/
86/*--- end ---*/
87/*--------------------------------------------------------------------*/