_LIBC_TSD_KEY_CTYPE_TOUPPER,
_LIBC_TSD_KEY_N };
-#include <sys/cdefs.h>
-#include <tls.h>
-
+#include <features.h>
#include <linuxthreads.old/internals.h>
-#if defined(USE_TLS) && USE_TLS && HAVE___THREAD
+#ifdef __UCLIBC_HAS_TLS__
+#include <tls.h>
/* When __thread works, the generic definition is what we want. */
# include <sysdeps/generic/bits/libc-tsd.h>
extern void __pthread_initialize (void);
/* TSD. */
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
extern int __pthread_internal_tsd_set (int key, const void * pointer);
extern void * __pthread_internal_tsd_get (int key);
extern void ** __attribute__ ((__const__))
__pthread_internal_tsd_address (int key);
+#endif
/* Sighandler wrappers. */
extern void __pthread_sighandler(int signo, SIGCONTEXT ctx);
struct pthread_functions __pthread_functions =
{
-#ifndef __UCLIBC_HAS_TLS__
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
.ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
.ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
.ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
__pthread_unlock(THREAD_GETMEM(self, p_lock));
}
-#ifndef __UCLIBC_HAS_TLS__
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
/* Thread-specific data for libc. */
void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
char *targetframe);
pthread_descr (*ptr_pthread_thread_self) (void);
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
void * (*ptr_pthread_internal_tsd_get) (int key);
void ** __attribute__ ((__const__))
(*ptr_pthread_internal_tsd_address) (int key);
+#endif
int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
struct sigaction *oact);
int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);