mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-05 21:00:05 +00:00
Update.
2003-01-16 Jakub Jelinek <jakub@redhat.com> * elf/dl-load.c (_dl_map_object_from_fd): Use GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has been already initialized.
This commit is contained in:
parent
a1f8ec97fd
commit
850dcfcafe
@ -1,3 +1,9 @@
|
||||
2003-01-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* elf/dl-load.c (_dl_map_object_from_fd): Use
|
||||
GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
|
||||
been already initialized.
|
||||
|
||||
2003-01-15 Dmitry V. Levin <ldv@altlinux.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/ptsname.c: Fix typo in comment.
|
||||
|
@ -953,9 +953,9 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
|
||||
/* If not loading the initial set of shared libraries,
|
||||
check whether we should permit loading a TLS segment. */
|
||||
if (__builtin_expect (l->l_type == lt_library, 1)
|
||||
/* If GL(dl_tls_max_dtv_idx) == 0, then rtld.c did not
|
||||
set up TLS data structures, so don't use them now. */
|
||||
|| __builtin_expect (GL(dl_tls_max_dtv_idx), 1) != 0)
|
||||
/* If GL(dl_tls_dtv_slotinfo_list) == NULL, then rtld.c did
|
||||
not set up TLS data structures, so don't use them now. */
|
||||
|| __builtin_expect (GL(dl_tls_dtv_slotinfo_list) != NULL, 1))
|
||||
{
|
||||
/* Assign the next available module ID. */
|
||||
l->l_tls_modid = _dl_next_tls_modid ();
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-01-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* pthread.c (_pthread_initialize_minimal): Use
|
||||
GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
|
||||
been already initialized.
|
||||
|
||||
2003-01-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
|
||||
|
@ -305,7 +305,7 @@ __pthread_initialize_minimal(void)
|
||||
taken care of initializing the TLS data structures. */
|
||||
__libc_setup_tls (TLS_TCB_SIZE, TLS_TCB_ALIGN);
|
||||
# elif !USE___THREAD
|
||||
if (__builtin_expect (GL(dl_tls_max_dtv_idx) == 0, 0))
|
||||
if (__builtin_expect (GL(dl_tls_dtv_slotinfo_list) == NULL, 0))
|
||||
{
|
||||
tcbhead_t *tcbp;
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
#include <sysdep.h>
|
||||
#include <tls.h>
|
||||
|
||||
--
|
||||
#ifdef USE_TLS
|
||||
MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_header.data.multiple_threads) - sizeof (struct _pthread_descr_struct)
|
||||
#else
|
||||
MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
|
||||
#endif
|
||||
|
@ -32,13 +32,6 @@ typedef union dtv
|
||||
void *pointer;
|
||||
} dtv_t;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dtv_t *dtv;
|
||||
void *private;
|
||||
} tcbhead_t;
|
||||
|
||||
#else /* __ASSEMBLER__ */
|
||||
# include <tcb-offsets.h>
|
||||
#endif /* __ASSEMBLER__ */
|
||||
@ -49,6 +42,13 @@ typedef struct
|
||||
# define USE_TLS 1
|
||||
|
||||
# ifndef __ASSEMBLER__
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dtv_t *dtv;
|
||||
void *private;
|
||||
} tcbhead_t;
|
||||
|
||||
/* This is the size of the initial TCB. */
|
||||
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
|
||||
|
||||
@ -106,14 +106,22 @@ typedef struct
|
||||
#else
|
||||
|
||||
# ifndef __ASSEMBLER__
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *tcb;
|
||||
dtv_t *dtv;
|
||||
void *self;
|
||||
int multiple_threads;
|
||||
} tcbhead_t;
|
||||
|
||||
/* Get the thread descriptor definition. */
|
||||
# include <linuxthreads/descr.h>
|
||||
|
||||
# define NONTLS_INIT_TP \
|
||||
do { \
|
||||
static struct _pthread_descr_struct nontls_init_tp \
|
||||
= { .p_header.data.multiple_threads = 0 }; \
|
||||
__thread_self = ((__typeof (__thread_self)) &nontls_init_tp) + 1; \
|
||||
static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \
|
||||
__thread_self = (__typeof (__thread_self)) &nontls_init_tp; \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-01-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
|
||||
if not SHARED.
|
||||
|
||||
2003-01-14 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
|
||||
|
Loading…
Reference in New Issue
Block a user