summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/forward.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-05-18 18:41:24 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-05-18 18:41:24 +0200
commit6a8ccc95528f5e86a8770ed15ce89609b5b3dee9 (patch)
treebbd4df35b4d4a6a8b00d7a5e61fb2668b850ad62 /libpthread/linuxthreads/forward.c
parent398a27a5b323956344b4f831d892fed3bd9813c7 (diff)
remove linuxthreads.new, rename linuxthreads.old
Linuxthreads.new isn't really useful with the existence of NPTL/TLS for well supported architectures. There is no reason to use LT.new for ARM/MIPS or other architectures supporting NPTL/TLS. It is not available for noMMU architectures like Blackfin or FR-V. To simplify the live of the few uClibc-ng developers, LT.new is removed and LT.old is renamed to LT. LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
Diffstat (limited to 'libpthread/linuxthreads/forward.c')
-rw-r--r--libpthread/linuxthreads/forward.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/libpthread/linuxthreads/forward.c b/libpthread/linuxthreads/forward.c
index 486d254dc..08295c8db 100644
--- a/libpthread/linuxthreads/forward.c
+++ b/libpthread/linuxthreads/forward.c
@@ -21,11 +21,36 @@
#include <dlfcn.h>
/* psm: keep this before internals.h */
+#if 0
+vda: here is why:
+headers contain libc_hidden_proto(foo).
+In libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h
+adding libc_hidden_proto(foo) just before weak_extern (__pthread_initialize)
+will not warn:
+ /* libc_hidden_proto(foo) */
+ weak_extern (__pthread_initialize)
+ /* libc_hidden_proto(foo) */
+but adding after will! Which is extremely strange -
+weak_extern expands into just "#pragma weak __pthread_initialize".
+TODO: determine whether it is a gcc bug or what
+(see gcc.gnu.org/PR36282).
+For now, just include all headers before internals.h
+(they are again included in internals.h - maybe remove them there later)
+#endif
+
+#include <string.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/time.h>
#include "internals.h"
/* Pointers to the libc functions. */
-struct pthread_functions __libc_pthread_functions;
+struct pthread_functions __libc_pthread_functions attribute_hidden;
# define FORWARD2(name, rettype, decl, params, defaction) \
@@ -137,8 +162,12 @@ FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate),
FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
+#if 0
FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
+#endif
FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
+#if 0
FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
+#endif
FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)