]>
sourceware.org Git - glibc.git/blob - sysdeps/unix/sysv/linux/time.c
1 /* time -- Get number of seconds since Epoch. Linux version.
2 Copyright (C) 2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 /* Optimize the function call by setting the PLT directly to vDSO symbol. */
23 # include <sysdep-vdso.h>
27 # include <libc-vdso.h>
30 time_syscall (time_t *t
)
32 return INLINE_SYSCALL_CALL (time
, t
);
36 # define INIT_ARCH() \
37 void *vdso_time = dl_vdso_vsym (HAVE_TIME_VSYSCALL);
39 vdso_time
? VDSO_IFUNC_RET (vdso_time
)
40 : (void *) time_syscall
);
46 return INLINE_VSYSCALL (time
, 1, t
);
49 #else /* USE_IFUNC_TIME */
50 # include <time/time.c>
This page took 0.03814 seconds and 5 git commands to generate.