From acadc5664e7f056e27c95d88522a573c1ed5cc49 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 22 Nov 2007 16:55:08 +0000 Subject: Add hidden symbols for a number of pthread functions, and use them to ensure that all entries in the __pthread_functions point to functions within libpthread, not identically-named functions in libc. --- libpthread/linuxthreads.old/cancel.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libpthread/linuxthreads.old/cancel.c') diff --git a/libpthread/linuxthreads.old/cancel.c b/libpthread/linuxthreads.old/cancel.c index ac66c5855..79409675f 100644 --- a/libpthread/linuxthreads.old/cancel.c +++ b/libpthread/linuxthreads.old/cancel.c @@ -37,6 +37,8 @@ extern void __rpc_thread_destroy(void); # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" #endif +libpthread_hidden_proto(pthread_setcancelstate) +libpthread_hidden_proto(pthread_setcanceltype) int pthread_setcancelstate(int state, int * oldstate) { @@ -51,6 +53,7 @@ int pthread_setcancelstate(int state, int * oldstate) __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); return 0; } +libpthread_hidden_def(pthread_setcancelstate) int pthread_setcanceltype(int type, int * oldtype) { @@ -65,6 +68,7 @@ int pthread_setcanceltype(int type, int * oldtype) __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); return 0; } +libpthread_hidden_def(pthread_setcanceltype) int pthread_cancel(pthread_t thread) { @@ -165,6 +169,7 @@ void _pthread_cleanup_push_defer(struct _pthread_cleanup_buffer * buffer, THREAD_SETMEM(self, p_canceltype, PTHREAD_CANCEL_DEFERRED); THREAD_SETMEM(self, p_cleanup, buffer); } +strong_alias(_pthread_cleanup_push_defer,__pthread_cleanup_push_defer) void _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer * buffer, int execute) @@ -178,6 +183,8 @@ void _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer * buffer, THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS) __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } +strong_alias(_pthread_cleanup_pop_restore,__pthread_cleanup_pop_restore) + void __pthread_perform_cleanup(char *currentframe) { -- cgit v1.2.3