mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
htl: Add internal versions of functions used by C11 threads
The C11 threads implementation needs to call pthread_join and pthread_key_delete without exposing them.
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
/* Make calling thread wait for termination of thread THREAD. Return
|
/* Make calling thread wait for termination of thread THREAD. Return
|
||||||
the exit status of the thread in *STATUS. */
|
the exit status of the thread in *STATUS. */
|
||||||
int
|
int
|
||||||
pthread_join (pthread_t thread, void **status)
|
__pthread_join (pthread_t thread, void **status)
|
||||||
{
|
{
|
||||||
struct __pthread *pthread;
|
struct __pthread *pthread;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@@ -75,3 +75,4 @@ pthread_join (pthread_t thread, void **status)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
strong_alias (__pthread_join, pthread_join);
|
||||||
|
@@ -112,6 +112,8 @@ extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
|
|||||||
extern int __pthread_key_create (pthread_key_t *__key,
|
extern int __pthread_key_create (pthread_key_t *__key,
|
||||||
void (*__destr_function) (void *));
|
void (*__destr_function) (void *));
|
||||||
|
|
||||||
|
extern int __pthread_key_delete (pthread_key_t __key);
|
||||||
|
|
||||||
extern int __pthread_setspecific (pthread_key_t __key,
|
extern int __pthread_setspecific (pthread_key_t __key,
|
||||||
const void *__pointer);
|
const void *__pointer);
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#include <pt-internal.h>
|
#include <pt-internal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
pthread_key_delete (pthread_key_t key)
|
__pthread_key_delete (pthread_key_t key)
|
||||||
{
|
{
|
||||||
error_t err = 0;
|
error_t err = 0;
|
||||||
|
|
||||||
@@ -61,3 +61,4 @@ pthread_key_delete (pthread_key_t key)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
strong_alias (__pthread_key_delete, pthread_key_delete)
|
||||||
|
@@ -45,6 +45,7 @@ int __pthread_create (pthread_t *newthread,
|
|||||||
void __cthread_detach (__cthread_t);
|
void __cthread_detach (__cthread_t);
|
||||||
int __pthread_detach (pthread_t __threadp);
|
int __pthread_detach (pthread_t __threadp);
|
||||||
void __pthread_exit (void *value) __attribute__ ((__noreturn__));
|
void __pthread_exit (void *value) __attribute__ ((__noreturn__));
|
||||||
|
int __pthread_join (pthread_t, void **);
|
||||||
int __cthread_keycreate (__cthread_key_t *);
|
int __cthread_keycreate (__cthread_key_t *);
|
||||||
int __cthread_getspecific (__cthread_key_t, void **);
|
int __cthread_getspecific (__cthread_key_t, void **);
|
||||||
int __cthread_setspecific (__cthread_key_t, void *);
|
int __cthread_setspecific (__cthread_key_t, void *);
|
||||||
|
Reference in New Issue
Block a user