Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Aug 3, 2002
1 parent 3db04c6 commit 1f3f143
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
7 changes: 7 additions & 0 deletions include/rpc/rpc.h
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions linuxthreads/ChangeLog
Original file line number Diff line number Diff line change
@@ -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>.
Expand Down
5 changes: 5 additions & 0 deletions linuxthreads/cancel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resolv/nss_dns/dns-host.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion sunrpc/Versions
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ libc {
}
GLIBC_PRIVATE {
# needed by libpthread.
__rpc_thread_destroy;
__rpc_thread_destroy; __libc_tsd_RPC_VARS;
}
}
6 changes: 6 additions & 0 deletions sunrpc/rpc_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 1f3f143

Please sign in to comment.