diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-01-11 22:39:13 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-01-11 22:39:13 +0000 |
commit | c8141d994e34babad60b3bb13f3b96636ce4d563 (patch) | |
tree | 483dd165228f95400d6dfb48cedbb7f4e49058e5 | |
parent | 3560961878b15be5ecad9cb0ea61cfb17f1da990 (diff) |
Peter Mazinger pointed out that my last commit was faulty.
This should fix it.
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/forward.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/pthread.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h | 5 | ||||
-rw-r--r-- | libpthread/linuxthreads/forward.c | 7 | ||||
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 4 | ||||
-rw-r--r-- | libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h | 5 |
7 files changed, 21 insertions, 6 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 4454c7b7c..1a9bc2a50 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -400,7 +400,7 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc, exit(main(argc, argv, __environ)); } -#ifdef __UCLIBC_HAS_THREADS__ +#if defined(__UCLIBC_HAS_THREADS__) && !defined(SHARED) /* Weaks for internal library use only. * * We need to define weaks here to cover all the pthread functions that diff --git a/libpthread/linuxthreads.old/forward.c b/libpthread/linuxthreads.old/forward.c index 87101a15b..2cd019651 100644 --- a/libpthread/linuxthreads.old/forward.c +++ b/libpthread/linuxthreads.old/forward.c @@ -140,5 +140,7 @@ FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate), FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0) FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return) +FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return) FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return) +FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return) diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c index 2efb4d2d4..19e826515 100644 --- a/libpthread/linuxthreads.old/pthread.c +++ b/libpthread/linuxthreads.old/pthread.c @@ -336,6 +336,8 @@ struct pthread_functions __pthread_functions = .ptr__pthread_cleanup_push = _pthread_cleanup_push, .ptr__pthread_cleanup_pop = _pthread_cleanup_pop */ + .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer, + .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore, }; #ifdef SHARED # define ptr_pthread_functions &__pthread_functions diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h index 846dc425b..ce6d10fba 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h @@ -84,9 +84,12 @@ struct pthread_functions const struct timespec *); void (*ptr__pthread_cleanup_push) (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg); - + void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer * buffer, + void (*routine)(void *), void * arg); void (*ptr__pthread_cleanup_pop) (struct _pthread_cleanup_buffer * buffer, int execute); + void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer * buffer, + int execute); }; /* Variable in libc.so. */ diff --git a/libpthread/linuxthreads/forward.c b/libpthread/linuxthreads/forward.c index 9ce119849..2cd019651 100644 --- a/libpthread/linuxthreads/forward.c +++ b/libpthread/linuxthreads/forward.c @@ -17,11 +17,13 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <dlfcn.h> +#include <features.h> #include <stdlib.h> +#include <dlfcn.h> /* psm: keep this before internals.h */ libc_hidden_proto(exit) + #include "internals.h" /* Pointers to the libc functions. */ @@ -129,7 +131,6 @@ strong_alias(pthread_mutex_trylock, __pthread_mutex_trylock) FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0) strong_alias(pthread_mutex_unlock, __pthread_mutex_unlock) - FORWARD2 (pthread_self, pthread_t, (void), (), return 0) @@ -139,5 +140,7 @@ FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate), FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0) FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return) +FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return) FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return) +FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return) diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 9eb89142d..64aad7cc1 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -278,7 +278,9 @@ struct pthread_functions __pthread_functions = .ptr_pthread_sigwait = __pthread_sigwait, .ptr_pthread_raise = __pthread_raise, .ptr__pthread_cleanup_push = _pthread_cleanup_push, - .ptr__pthread_cleanup_pop = _pthread_cleanup_pop + .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer, + .ptr__pthread_cleanup_pop = _pthread_cleanup_pop, + .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore, }; #ifdef SHARED # define ptr_pthread_functions &__pthread_functions diff --git a/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h b/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h index 359e1a67b..258e1fc23 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h +++ b/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h @@ -84,9 +84,12 @@ struct pthread_functions const struct timespec *); void (*ptr__pthread_cleanup_push) (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg); - + void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer * buffer, + void (*routine)(void *), void * arg); void (*ptr__pthread_cleanup_pop) (struct _pthread_cleanup_buffer * buffer, int execute); + void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer * buffer, + int execute); }; /* Variable in libc.so. */ |