#include "vki_unistd.h" /* for the __NR_* constants */
-/* COPIED FROM /usr/include/asm-i386/prctl.h (amd64-linux) */
-#define ARCH_SET_GS 0x1001
-#define ARCH_SET_FS 0x1002
-#define ARCH_GET_FS 0x1003
-#define ARCH_GET_GS 0x1004
-
/* ---------------------------------------------------------------------
Stacks, thread wrappers
// PRE_MEM_READs/PRE_MEM_WRITEs as necessary...
/* "do" the syscall ourselves; the kernel never sees it */
- vg_assert(ARG1 == ARCH_SET_FS);
+ vg_assert(ARG1 == VKI_ARCH_SET_FS);
tst = VG_(get_ThreadState)(tid);
tst->arch.vex.guest_FS_ZERO = ARG2;
#define VKI_GDT_ENTRY_TLS_MIN 11
#define VKI_GDT_ENTRY_TLS_MAX 13
+// These are actually from linux-???/include/asm-i386/prctl.h.
+// But they appear to be needed on amd64.
+#define VKI_ARCH_SET_GS 0x1001
+#define VKI_ARCH_SET_FS 0x1002
+#define VKI_ARCH_GET_FS 0x1003
+#define VKI_ARCH_GET_GS 0x1004
+
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-x86_64/ldt.h
//----------------------------------------------------------------------