This source file includes following definitions.
- __vdso_clock_gettime
- __vdso_gettimeofday
- __vdso_time
- __vdso_getcpu
1
2
3
4
5
6
7
8
9
10 #define DISABLE_BRANCH_PROFILING
11
12 #include <linux/time.h>
13 #include <linux/getcpu.h>
14 #include <asm/unistd.h>
15
16 int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
17 {
18 long ret;
19
20 asm("syscall" : "=a" (ret) :
21 "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
22
23 return ret;
24 }
25 int clock_gettime(clockid_t, struct timespec *)
26 __attribute__((weak, alias("__vdso_clock_gettime")));
27
28 int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
29 {
30 long ret;
31
32 asm("syscall" : "=a" (ret) :
33 "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
34
35 return ret;
36 }
37 int gettimeofday(struct timeval *, struct timezone *)
38 __attribute__((weak, alias("__vdso_gettimeofday")));
39
40 time_t __vdso_time(time_t *t)
41 {
42 long secs;
43
44 asm volatile("syscall"
45 : "=a" (secs)
46 : "0" (__NR_time), "D" (t) : "cc", "r11", "cx", "memory");
47
48 return secs;
49 }
50 time_t time(time_t *t) __attribute__((weak, alias("__vdso_time")));
51
52 long
53 __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
54 {
55
56
57
58
59 if (cpu)
60 *cpu = 0;
61 if (node)
62 *node = 0;
63
64 return 0;
65 }
66
67 long getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
68 __attribute__((weak, alias("__vdso_getcpu")));