xref: /openbmc/qemu/tests/tcg/x86_64/vsyscall.c (revision a648df38)
1*f6648775SIlya Leoshkevich #include <stdio.h>
2*f6648775SIlya Leoshkevich #include <time.h>
3*f6648775SIlya Leoshkevich 
4*f6648775SIlya Leoshkevich #define VSYSCALL_PAGE 0xffffffffff600000
5*f6648775SIlya Leoshkevich #define TIME_OFFSET 0x400
6*f6648775SIlya Leoshkevich typedef time_t (*time_func)(time_t *);
7*f6648775SIlya Leoshkevich 
main(void)8*f6648775SIlya Leoshkevich int main(void)
9*f6648775SIlya Leoshkevich {
10*f6648775SIlya Leoshkevich     printf("%ld\n", ((time_func)(VSYSCALL_PAGE + TIME_OFFSET))(NULL));
11*f6648775SIlya Leoshkevich     return 0;
12*f6648775SIlya Leoshkevich }
13