aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-03 03:53:28 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-03 03:53:28 +0000
commit1f3f143e627ba38e05da328670a80b3ac8712e51 (patch)
treeaa6614de58d63d277af13a170c26a7709218322d
parent3db04c6ff75614f146c5b5152313dd17a7419468 (diff)
downloadglibc-1f3f143e627ba38e05da328670a80b3ac8712e51.zip
glibc-1f3f143e627ba38e05da328670a80b3ac8712e51.tar.gz
glibc-1f3f143e627ba38e05da328670a80b3ac8712e51.tar.bz2
Update.
2002-08-02 Ulrich Drepper <drepper@redhat.com> * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]: Don't use p_libc_specific element in thread descriptor.
-rw-r--r--include/rpc/rpc.h7
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/cancel.c5
-rw-r--r--resolv/nss_dns/dns-host.c4
-rw-r--r--sunrpc/Versions2
-rw-r--r--sunrpc/rpc_thread.c6
6 files changed, 26 insertions, 3 deletions
diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h
index 9f90ae1..ea57791 100644
--- a/include/rpc/rpc.h
+++ b/include/rpc/rpc.h
@@ -1,5 +1,6 @@
#ifndef _RPC_RPC_H
#include <sunrpc/rpc/rpc.h>
+#include <bits/libc-tsd.h>
/* Now define the internal interfaces. */
extern unsigned long _create_xid (void);
@@ -43,9 +44,15 @@ extern void __rpc_thread_clnt_cleanup (void);
extern void __rpc_thread_key_cleanup (void);
extern void __rpc_thread_destroy (void);
+#if USE_TLS && HAVE___THREAD
+__libc_tsd_define (extern, RPC_VARS)
+#endif
#define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
+libc_hidden_proto (__rpc_thread_svc_fdset)
+libc_hidden_proto (__rpc_thread_createerr)
+
#endif /* _RPC_THREAD_SAFE_ */
#endif
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 4b86627..b904593 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-02 Ulrich Drepper <drepper@redhat.com>
+
+ * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
+ Don't use p_libc_specific element in thread descriptor.
+
2002-07-30 Roland McGrath <roland@redhat.com>
* sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
diff --git a/linuxthreads/cancel.c b/linuxthreads/cancel.c
index 5649bc4..47c0bfe 100644
--- a/linuxthreads/cancel.c
+++ b/linuxthreads/cancel.c
@@ -202,8 +202,13 @@ void __pthread_perform_cleanup(char *currentframe)
}
/* And the TSD which needs special help. */
+#if !(USE_TLS && HAVE___THREAD)
if (THREAD_GETMEM(self, p_libc_specific[_LIBC_TSD_KEY_RPC_VARS]) != NULL)
__rpc_thread_destroy ();
+#else
+ if (__libc_tsd_get (RPC_VARS) != NULL)
+ __rpc_thread_destroy ();
+#endif
}
#ifndef SHARED
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index f5e3058..77441f7 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -233,7 +233,7 @@ _nss_dns_gethostbyaddr_r (const void *addr, socklen_t len, int af,
char linebuffer[0];
} *host_data = (struct host_data *) buffer;
querybuf host_buffer;
- char qbuf[MAXDNAME+1], *qp;
+ char qbuf[MAXDNAME+1], *qp = NULL;
size_t size;
int n, status;
diff --git a/sunrpc/Versions b/sunrpc/Versions
index 4e40927..d86d40a 100644
--- a/sunrpc/Versions
+++ b/sunrpc/Versions
@@ -115,6 +115,6 @@ libc {
}
GLIBC_PRIVATE {
# needed by libpthread.
- __rpc_thread_destroy;
+ __rpc_thread_destroy; __libc_tsd_RPC_VARS;
}
}
diff --git a/sunrpc/rpc_thread.c b/sunrpc/rpc_thread.c
index 5c25963..b9f4f58 100644
--- a/sunrpc/rpc_thread.c
+++ b/sunrpc/rpc_thread.c
@@ -10,7 +10,11 @@
/* Variable used in non-threaded applications or for the first thread. */
static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem;
+#if USE_TLS && HAVE___THREAD
+__libc_tsd_define (, RPC_VARS)
+#else
__libc_tsd_define (static, RPC_VARS)
+#endif
/*
* Task-variable destructor
@@ -85,6 +89,7 @@ __rpc_thread_svc_fdset (void)
return &svc_fdset;
return &tvp->svc_fdset_s;
}
+libc_hidden_def (__rpc_thread_svc_fdset)
struct rpc_createerr *
__rpc_thread_createerr (void)
@@ -96,6 +101,7 @@ __rpc_thread_createerr (void)
return &rpc_createerr;
return &tvp->rpc_createerr_s;
}
+libc_hidden_def (__rpc_thread_createerr)
struct pollfd **
__rpc_thread_svc_pollfd (void)