mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
allocate_once: Apply asm redirection before first use
Compilers may not be able to apply asm redirections to functions after these functions are used for the first time, e.g. clang 15. Reviewed-by: Fangrui Song <maskray@google.com>
This commit is contained in:
parent
34b358eb03
commit
8161978f89
@ -27,6 +27,9 @@ void *__libc_allocate_once_slow (void **__place,
|
||||
void (*__deallocate) (void *__closure,
|
||||
void *__ptr),
|
||||
void *__closure);
|
||||
#ifndef _ISOMAC
|
||||
libc_hidden_proto (__libc_allocate_once_slow)
|
||||
#endif
|
||||
|
||||
/* Return an a pointer to an allocated and initialized data structure.
|
||||
If this function returns a non-NULL value, the caller can assume
|
||||
@ -88,8 +91,4 @@ allocate_once (void **__place, void *(*__allocate) (void *__closure),
|
||||
__closure);
|
||||
}
|
||||
|
||||
#ifndef _ISOMAC
|
||||
libc_hidden_proto (__libc_allocate_once_slow)
|
||||
#endif
|
||||
|
||||
#endif /* _ALLOCATE_ONCE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user