initial commit
[glibc.git] / sysdeps / unix / bsd / bsd4.4 / kfreebsd / x86_64 / sysarch.h
1 /* Parameters for the architecture specific system call. amd64 version.
2 Copyright (C) 2002 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
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.
9
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.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20 #ifndef _SYSARCH_H
21 #define _SYSARCH_H 1
22
23 #include <features.h>
24
25 /* Function that can be used as first argument to 'sysarch'. */
26 enum
27 {
28 I386_GET_LDT = 0,
29 #define I386_GET_LDT I386_GET_LDT
30 I386_SET_LDT = 1,
31 #define I386_SET_LDT I386_SET_LDT
32 I386_GET_IOPERM = 3,
33 #define I386_GET_IOPERM I386_GET_IOPERM
34 I386_SET_IOPERM = 4,
35 #define I386_SET_IOPERM I386_SET_IOPERM
36 I386_GET_FSBASE = 7,
37 #define I386_GET_FSBASE I386_GET_FSBASE
38 I386_SET_FSBASE = 8,
39 #define I386_SET_FSBASE I386_SET_FSBASE
40 I386_GET_GSBASE = 9,
41 #define I386_GET_GSBASE I386_GET_GSBASE
42 I386_SET_GSBASE = 10,
43 #define I386_SET_GSBASE I386_SET_GSBASE
44 AMD64_GET_FSBASE = 128,
45 #define AMD64_GET_FSBASE AMD64_GET_FSBASE
46 AMD64_SET_FSBASE = 129,
47 #define AMD64_SET_FSBASE AMD64_SET_FSBASE
48 AMD64_GET_GSBASE = 130,
49 #define AMD64_GET_GSBASE AMD64_GET_GSBASE
50 AMD64_SET_GSBASE = 131
51 #define AMD64_SET_GSBASE AMD64_SET_GSBASE
52 };
53
54 /* Argument struct for I386_GET_IOPERM and I386_SET_IOPERM. */
55 struct i386_ioperm_args
56 {
57 unsigned int start;
58 unsigned int length;
59 int enable;
60 };
61
62 __BEGIN_DECLS
63
64 extern int sysarch (int __cmd, void *__arg);
65
66 #ifdef _LIBC
67 extern int __sysarch (int __cmd, void *__arg);
68 #endif
69
70 __END_DECLS
71
72 #endif /* _SYSARCH_H */