about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
blob: f7121106bc2803cb2f0cc8101f90f31e93fa6dce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "bits/libc-vdso.h"

#ifdef SHARED
# define SYSCALL_GETTIME(id, tp) \
  ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
  long int v_ret;							  \
  PTR_DEMANGLE (f);							  \
  v_ret = f (id, tp);							  \
  if (INTERNAL_SYSCALL_ERROR_P (v_ret, )) {				  \
    __set_errno (INTERNAL_SYSCALL_ERRNO (v_ret, ));			  \
    v_ret = -1;								  \
  }									  \
  v_ret; })
# define INTERNAL_GETTIME(id, tp) \
  ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
  PTR_DEMANGLE (f);							  \
  f (id, tp); })
#endif

#include "../clock_gettime.c"