mirror of
https://github.com/fluencelabs/musl
synced 2025-06-21 10:41:53 +00:00
i386 vsyscall support (vdso-provided sysenter/syscall instruction based)
this doubles the performance of the fastest syscalls on the atom I tested it on; improvement is reportedly much more dramatic on worst-case cpus. cannot be used for cancellable syscalls.
This commit is contained in:
3
src/env/__libc_start_main.c
vendored
3
src/env/__libc_start_main.c
vendored
@ -6,6 +6,8 @@ void __init_security(size_t *);
|
||||
|
||||
#define AUX_CNT 38
|
||||
|
||||
extern size_t __hwcap, __sysinfo;
|
||||
|
||||
void __init_libc(char **envp)
|
||||
{
|
||||
size_t i, *auxv, aux[AUX_CNT] = { 0 };
|
||||
@ -14,6 +16,7 @@ void __init_libc(char **envp)
|
||||
libc.auxv = auxv = (void *)(envp+i+1);
|
||||
for (i=0; auxv[i]; i+=2) if (auxv[i]<AUX_CNT) aux[auxv[i]] = auxv[i+1];
|
||||
__hwcap = aux[AT_HWCAP];
|
||||
__sysinfo = aux[AT_SYSINFO];
|
||||
|
||||
__init_tls(aux);
|
||||
__init_security(aux);
|
||||
|
Reference in New Issue
Block a user