vdso.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2012 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. #ifndef __TILE_VDSO_H__
  15. #define __TILE_VDSO_H__
  16. #include <linux/seqlock.h>
  17. #include <linux/types.h>
  18. /*
  19. * Note about the vdso_data structure:
  20. *
  21. * NEVER USE THEM IN USERSPACE CODE DIRECTLY. The layout of the
  22. * structure is supposed to be known only to the function in the vdso
  23. * itself and may change without notice.
  24. */
  25. struct vdso_data {
  26. seqcount_t tz_seq; /* Timezone seqlock */
  27. seqcount_t tb_seq; /* Timebase seqlock */
  28. __u64 cycle_last; /* TOD clock for xtime */
  29. __u64 mask; /* Cycle mask */
  30. __u32 mult; /* Cycle to nanosecond multiplier */
  31. __u32 shift; /* Cycle to nanosecond divisor (power of two) */
  32. __u64 wall_time_sec;
  33. __u64 wall_time_snsec;
  34. __u64 monotonic_time_sec;
  35. __u64 monotonic_time_snsec;
  36. __u64 wall_time_coarse_sec;
  37. __u64 wall_time_coarse_nsec;
  38. __u64 monotonic_time_coarse_sec;
  39. __u64 monotonic_time_coarse_nsec;
  40. __u32 tz_minuteswest; /* Minutes west of Greenwich */
  41. __u32 tz_dsttime; /* Type of dst correction */
  42. };
  43. extern struct vdso_data *vdso_data;
  44. /* __vdso_rt_sigreturn is defined with the addresses in the vdso page. */
  45. extern void __vdso_rt_sigreturn(void);
  46. extern int setup_vdso_pages(void);
  47. #endif /* __TILE_VDSO_H__ */