mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-12 19:04:54 +03:00
htl: Add wrapper header for <semaphore.h> with hidden __sem_post
This is required to avoid a check-localplt failure due to a sem_post call through the PLT. Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
9
sysdeps/htl/include/semaphore.h
Normal file
9
sysdeps/htl/include/semaphore.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef _SEMAPHORE_H
|
||||
#include_next <semaphore.h>
|
||||
|
||||
#ifndef _ISOMAC
|
||||
extern __typeof (sem_post) __sem_post;
|
||||
libpthread_hidden_proto (__sem_post)
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -64,5 +64,5 @@ __sem_post (sem_t *sem)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
libpthread_hidden_def (__sem_post)
|
||||
strong_alias (__sem_post, sem_post);
|
||||
|
@@ -167,7 +167,7 @@ out_locked:
|
||||
{
|
||||
if (ret == 0 && ctx.cancel_wake == 0)
|
||||
/* We were cancelled while waking up with a token, put it back. */
|
||||
sem_post (sem);
|
||||
__sem_post (sem);
|
||||
|
||||
__pthread_exit (PTHREAD_CANCELED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user