/arch/x86/include/asm/vsyscall.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35 · C++ Header · 44 lines · 31 code · 11 blank · 2 comment · 0 complexity · 9bb866064e07deae1ff46aaf9b4f01ae MD5 · raw file

  1. #ifndef _ASM_X86_VSYSCALL_H
  2. #define _ASM_X86_VSYSCALL_H
  3. enum vsyscall_num {
  4. __NR_vgettimeofday,
  5. __NR_vtime,
  6. __NR_vgetcpu,
  7. };
  8. #define VSYSCALL_START (-10UL << 20)
  9. #define VSYSCALL_SIZE 1024
  10. #define VSYSCALL_END (-2UL << 20)
  11. #define VSYSCALL_MAPPED_PAGES 1
  12. #define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))
  13. #ifdef __KERNEL__
  14. #include <linux/seqlock.h>
  15. #define __section_vgetcpu_mode __attribute__ ((unused, __section__ (".vgetcpu_mode"), aligned(16)))
  16. #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16)))
  17. /* Definitions for CONFIG_GENERIC_TIME definitions */
  18. #define __section_vsyscall_gtod_data __attribute__ \
  19. ((unused, __section__ (".vsyscall_gtod_data"),aligned(16)))
  20. #define __section_vsyscall_clock __attribute__ \
  21. ((unused, __section__ (".vsyscall_clock"),aligned(16)))
  22. #define __vsyscall_fn \
  23. __attribute__ ((unused, __section__(".vsyscall_fn"))) notrace
  24. #define VGETCPU_RDTSCP 1
  25. #define VGETCPU_LSL 2
  26. extern int __vgetcpu_mode;
  27. extern volatile unsigned long __jiffies;
  28. /* kernel space (writeable) */
  29. extern int vgetcpu_mode;
  30. extern struct timezone sys_tz;
  31. extern void map_vsyscall(void);
  32. #endif /* __KERNEL__ */
  33. #endif /* _ASM_X86_VSYSCALL_H */