2222#include <pthread.h>
2323#include <errno.h>
2424
25- void * _pthread_getspecific (pthread_key_t key );
26- int _pthread_setspecific (pthread_key_t key , const void * value );
27- int _pthread_key_create (pthread_key_t * key , void (* destructor )(void * ));
28- int _pthread_once (pthread_once_t * once_control , void (* init_routine )(void ));
29-
3025void * pthread_getspecific (pthread_key_t key ) __attribute__((weak ));
3126int pthread_setspecific (pthread_key_t key , const void * value ) __attribute__((weak ));
3227int pthread_key_create (pthread_key_t * key , void (* destructor )(void * )) __attribute__((weak ));
3328int pthread_once (pthread_once_t * once_control , void (* init_routine )(void )) __attribute__((weak ));
3429
3530void *
36- _pthread_getspecific (pthread_key_t key )
31+ _libc_pthread_getspecific (pthread_key_t key )
3732{
3833 void * (* func )(pthread_key_t key );
3934 func = pthread_getspecific ;
@@ -43,7 +38,7 @@ _pthread_getspecific(pthread_key_t key)
4338}
4439
4540int
46- _pthread_setspecific (pthread_key_t key , const void * value )
41+ _libc_pthread_setspecific (pthread_key_t key , const void * value )
4742{
4843 int (* func )(pthread_key_t key , const void * value );
4944 func = pthread_setspecific ;
@@ -54,7 +49,7 @@ _pthread_setspecific(pthread_key_t key, const void *value)
5449
5550
5651int
57- _pthread_key_create (pthread_key_t * key , void (* destructor )(void * ))
52+ _libc_pthread_key_create (pthread_key_t * key , void (* destructor )(void * ))
5853{
5954 int (* func )(pthread_key_t * key , void (* destructor )(void * ));
6055 func = pthread_key_create ;
@@ -64,7 +59,7 @@ _pthread_key_create(pthread_key_t *key, void (*destructor)(void *))
6459}
6560
6661int
67- _pthread_once (pthread_once_t * once_control , void (* init_routine )(void ))
62+ _libc_pthread_once (pthread_once_t * once_control , void (* init_routine )(void ))
6863{
6964 int (* func )(pthread_once_t * once_control , void (* init_routine )(void ));
7065 func = pthread_once ;
0 commit comments