mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-29 05:51:10 +00:00
986a506481
This patch simplifies the powerpc internal macros for vDSO calls by: - Removing INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, used solely on get_timebase_freq. - Adjust INTERNAL_VSYSCALL_CALL_TYPE powerpc32 to follow powerpc64 argument ordering. - Use HAVE_*_VSYSCALL instead of explicit strings. - Make powerpc libc-vdso.h include generic implementation. No semantic change expected, checked on powerpc-linux-gnu-power4, powerpc64-linux-gnu, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/libc-vdso.h (VDSO_IFUNC_RET): Define if not defined. * sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c (__get_timebase_freq): Remove use of INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK. (get_timebase_freq_fallback): New symbol. * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (time): Use HAVE_GETTIMEOFDAY_VSYSCALL. * sysdeps/unix/sysv/linux/powerpc/time.c (gettimeofday): Use HAVE_TIME_VSYSCALL. * sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: Include generic implementation. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INTERNAL_VSYSCALL_CALL_TYPE): Make calling convention similar to powerpc64. (INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Remove macro. * .../sysv/linux/powerpc/powerpc64/sysdep.h (INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep.h (HAVE_GETTIMEOFDAY_VSYSCALL): Define.
52 lines
1.8 KiB
C
52 lines
1.8 KiB
C
/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
|
|
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library. If not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef _LIBC_VDSO_H
|
|
#define _LIBC_VDSO_H
|
|
|
|
#define VDSO_SYMBOL(__name) __vdso_##__name
|
|
|
|
/* Adjust the return IFUNC value from a vDSO symbol accordingly required
|
|
by the ELFv1 ABI. It is used by the architecture to create an ODP
|
|
entry since the kernel vDSO does not provide it. */
|
|
#ifndef VDSO_IFUNC_RET
|
|
# define VDSO_IFUNC_RET(__value) (__value)
|
|
#endif
|
|
|
|
#ifdef HAVE_CLOCK_GETTIME_VSYSCALL
|
|
extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
|
attribute_hidden;
|
|
#endif
|
|
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
|
extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
|
|
attribute_hidden;
|
|
#endif
|
|
#ifdef HAVE_GETTIMEOFDAY_VSYSCALL
|
|
extern int (*VDSO_SYMBOL (gettimeofday)) (struct timeval *, void *)
|
|
attribute_hidden;
|
|
#endif
|
|
#ifdef HAVE_GETCPU_VSYSCALL
|
|
extern long int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *, void *)
|
|
attribute_hidden;
|
|
#endif
|
|
#ifdef HAVE_TIME_VSYSCALL
|
|
extern time_t (*VDSO_SYMBOL(time)) (time_t *) attribute_hidden;
|
|
#endif
|
|
|
|
#endif /* _LIBC_VDSO_H */
|