Exemplo n.º 1
0
void *
time_ifunc (void)
{
  PREPARE_VERSION (linux2615, "LINUX_2.6.15", 123718565);

  /* If the vDSO is not available we fall back to the syscall.  */
  void *vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
  return (vdso_time ? VDSO_IFUNC_RET (vdso_time)
	  : (void*)time_syscall);
}
Exemplo n.º 2
0
void *
gettimeofday_ifunc (void)
{
  PREPARE_VERSION (linux2615, "LINUX_2.6.15", 123718565);

  /* If the vDSO is not available we fall back syscall.  */
  void *vdso_gettimeofday = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615);
  return (vdso_gettimeofday ? VDSO_IFUNC_RET (vdso_gettimeofday)
	  : (void*)__gettimeofday_syscall);
}
Exemplo n.º 3
0
{
  struct timeval tv;
  time_t result;

  if (INLINE_VSYSCALL (gettimeofday, 2, &tv, NULL) < 0)
    result = (time_t) -1;
  else
    result = (time_t) tv.tv_sec;

  if (t != NULL)
    *t = result;
  return result;
}

# define INIT_ARCH()							\
  PREPARE_VERSION (linux2615, "LINUX_2.6.15", 123718565);		\
  void *vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);

/* If the vDSO is not available we fall back to the syscall.  */
libc_ifunc_hidden (__redirect_time, time,
		   vdso_time
		   ? VDSO_IFUNC_RET (vdso_time)
		   : (void *) time_syscall);
libc_hidden_def (time)

#else

#include <sysdeps/posix/time.c>

#endif /* !SHARED */