sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
njn | f11335a | 2009-05-20 04:09:38 +0000 | [diff] [blame^] | 3 | /*--- Syscall numbers and related operations. pub_tool_vkiscnums.h ---*/ |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 4 | /*--------------------------------------------------------------------*/ |
| 5 | |
| 6 | /* |
| 7 | This file is part of Valgrind, a dynamic binary instrumentation |
| 8 | framework. |
| 9 | |
njn | 9f20746 | 2009-03-10 22:02:09 +0000 | [diff] [blame] | 10 | Copyright (C) 2005-2009 Nicholas Nethercote |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 11 | njn@valgrind.org |
njn | 9f20746 | 2009-03-10 22:02:09 +0000 | [diff] [blame] | 12 | Copyright (C) 2006-2009 OpenWorks LLP |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 13 | 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" |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 56 | |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 57 | #elif defined(VGP_amd64_linux) |
| 58 | # include "vki/vki-scnums-amd64-linux.h" |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 59 | |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 60 | #elif defined(VGP_ppc32_linux) |
| 61 | # include "vki/vki-scnums-ppc32-linux.h" |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 62 | |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 63 | #elif defined(VGP_ppc64_linux) |
| 64 | # include "vki/vki-scnums-ppc64-linux.h" |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 65 | |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 66 | #elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) |
| 67 | # include "vki/vki-scnums-aix5.h" |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 68 | |
| 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. */ |
| 75 | extern UChar* VG_(aix5_sysno_to_sysname)( Int sysno ); |
| 76 | |
| 77 | #endif /* !defined(VG_IN_ASSEMBLY_SOURCE) */ |
| 78 | |
sewardj | 4eee476 | 2006-10-14 15:51:32 +0000 | [diff] [blame] | 79 | #else |
| 80 | # error Unknown platform |
| 81 | #endif |
| 82 | |
| 83 | #endif // __PUB_TOOL_VKISCNUMS_H |
| 84 | |
| 85 | /*--------------------------------------------------------------------*/ |
| 86 | /*--- end ---*/ |
| 87 | /*--------------------------------------------------------------------*/ |