mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
S390: Add support for vdso getcpu symbol.
This patch adds support for symbol __kernel_getcpu in vDSO, which is available with kernel 4.5. Now sched_getcpu is using this symbol if available in mapped vDSO by defining macro HAVE_GETCPU_VSYSCALL. If not available at runtime, the former syscall is used.
This commit is contained in:
@@ -29,6 +29,8 @@ long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
||||
long int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
|
||||
__attribute__ ((nocommon));
|
||||
|
||||
long int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *, void *)
|
||||
attribute_hidden;
|
||||
|
||||
static inline void
|
||||
_libc_vdso_platform_setup (void)
|
||||
@@ -46,6 +48,10 @@ _libc_vdso_platform_setup (void)
|
||||
p = _dl_vdso_vsym ("__kernel_clock_getres", &linux2629);
|
||||
PTR_MANGLE (p);
|
||||
VDSO_SYMBOL (clock_getres) = p;
|
||||
|
||||
p = _dl_vdso_vsym ("__kernel_getcpu", &linux2629);
|
||||
PTR_MANGLE (p);
|
||||
VDSO_SYMBOL (getcpu) = p;
|
||||
}
|
||||
|
||||
# define VDSO_SETUP _libc_vdso_platform_setup
|
||||
|
||||
Reference in New Issue
Block a user