1
0
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:
Florian Weimer
2020-06-24 13:38:08 +02:00
parent 6f3331f26d
commit 1fb7dc751e
3 changed files with 11 additions and 2 deletions

View 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

View File

@@ -64,5 +64,5 @@ __sem_post (sem_t *sem)
return 0;
}
libpthread_hidden_def (__sem_post)
strong_alias (__sem_post, sem_post);

View File

@@ -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);
}