diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index 0d6e393310f3..4194fe180565 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -43,6 +43,8 @@ __weak_reference(_thr_setcanceltype, pthread_setcanceltype); __weak_reference(_thr_setcanceltype, _pthread_setcanceltype); __weak_reference(_Tthr_testcancel, pthread_testcancel); __weak_reference(_Tthr_testcancel, _pthread_testcancel); +__weak_reference(_Tthr_cancel_enter, _pthread_cancel_enter); +__weak_reference(_Tthr_cancel_leave, _pthread_cancel_leave); static inline void testcancel(struct pthread *curthread) @@ -173,13 +175,13 @@ _thr_cancel_leave(struct pthread *curthread, int maycancel) } void -_pthread_cancel_enter(int maycancel) +_Tthr_cancel_enter(int maycancel) { _thr_cancel_enter2(_get_curthread(), maycancel); } void -_pthread_cancel_leave(int maycancel) +_Tthr_cancel_leave(int maycancel) { _thr_cancel_leave(_get_curthread(), maycancel); } diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 914d51363bd7..9c5d1ede2d30 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -265,8 +265,8 @@ static pthread_func_t jmp_table[][2] = { [PJT_TESTCANCEL] = {DUAL_ENTRY(_Tthr_testcancel)}, [PJT_CLEANUP_POP_IMP] = {DUAL_ENTRY(__thr_cleanup_pop_imp)}, [PJT_CLEANUP_PUSH_IMP] = {DUAL_ENTRY(__thr_cleanup_push_imp)}, - [PJT_CANCEL_ENTER] = {DUAL_ENTRY(_thr_cancel_enter)}, - [PJT_CANCEL_LEAVE] = {DUAL_ENTRY(_thr_cancel_leave)}, + [PJT_CANCEL_ENTER] = {DUAL_ENTRY(_Tthr_cancel_enter)}, + [PJT_CANCEL_LEAVE] = {DUAL_ENTRY(_Tthr_cancel_leave)}, [PJT_MUTEX_CONSISTENT] = {DUAL_ENTRY(_Tthr_mutex_consistent)}, [PJT_MUTEXATTR_GETROBUST] = {DUAL_ENTRY(_thr_mutexattr_getrobust)}, [PJT_MUTEXATTR_SETROBUST] = {DUAL_ENTRY(_thr_mutexattr_setrobust)}, diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 5bbe05a6a4e9..ed09cd2bf50b 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1022,6 +1022,8 @@ void __thr_cleanup_pop_imp(int); void _thr_cleanup_push(void (*)(void *), void *); void _thr_cleanup_pop(int); void _Tthr_testcancel(void); +void _Tthr_cancel_enter(int); +void _Tthr_cancel_leave(int); int _thr_cancel(pthread_t); int _thr_atfork(void (*)(void), void (*)(void), void (*)(void)); int _thr_attr_destroy(pthread_attr_t *);