aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-12-03 02:50:58 +0000
committerRoland McGrath <roland@gnu.org>2002-12-03 02:50:58 +0000
commitfa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff (patch)
tree413449448f0ca03a2a7601f58c77ce01c8927199
parent2d14868942150183adaf0bc80b8ed6b70b65261e (diff)
downloadglibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.zip
glibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.tar.gz
glibc-fa9a4ff0ba0b66f544bcd69e6bd0929f0a7fc7ff.tar.bz2
* sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both
bits of RM are cleared.
-rw-r--r--ChangeLog5
-rw-r--r--linuxthreads/ChangeLog14
-rw-r--r--nptl/ChangeLog14
-rw-r--r--nptl/allocatestack.c1
-rw-r--r--nptl/events.c2
-rw-r--r--nptl/pthreadP.h13
-rw-r--r--nptl/pthread_create.c10
-rw-r--r--nptl/pthread_key_create.c6
-rw-r--r--nptl_db/ChangeLog6
-rw-r--r--nptl_db/td_symbol_list.c2
-rw-r--r--nptl_db/td_ta_map_lwp2thr.c7
-rw-r--r--sysdeps/hppa/fpu/fesetround.c2
12 files changed, 67 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 593f6a6..f4d324a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-02 Carlos O'Donell <carlos@baldric.uwo.ca>
+
+ * sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both
+ bits of RM are cleared.
+
2002-12-02 Roland McGrath <roland@redhat.com>
* elf/tst-tls4.c: Define an unused TLS variable here, so that no lazy
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 53ef5c6..f47f319 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,15 @@
+2002-11-28 Roland McGrath <roland@redhat.com>
+
+ * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
+ before other headers, so FLOATING_STACKS is not defined wrongly.
+
+ * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
+ even if [! FLOATING_STACKS].
+ (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
+ If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
+ dl_osversion >= 2.3.99 and fatal if not.
+ (TLS_DO_MODIFY_LDT): Use it.
+
2002-11-28 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
@@ -6,7 +18,7 @@
2002-11-19 Ulrich Drepper <drepper@redhat.com>
- * Versions (libc:GLIBC_2.0): Remove names of functions which are
+ * Versions (libc: GLIBC_2.0): Remove names of functions which are
not defined in libc.
* Makefile (shared-only-routines): Add weaks.
* weaks.c: Remove functions which are not exported from libc.so.
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 187b443..537c598 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,17 @@
+2002-12-02 Roland McGrath <roland@redhat.com>
+
+ * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
+ Declare using hidden_proto instead of attribute_hidden, so there are
+ non-.hidden static symbols for gdb to find.
+ (__pthread_keys): Likewise.
+ * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
+ * allocatestack.c (__stack_user): Likewise.
+ * pthread_create.c (__pthread_keys): Likewise.
+ (__nptl_threads_events, __nptl_last_event): Make these static instead
+ of hidden.
+ * pthread_key_create.c (__pthread_pthread_keys_max,
+ __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
+
2002-12-02 Ulrich Drepper <drepper@redhat.com>
* pthread_cond_timedwait.c: Include <stdlib.h>.
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 2aaaaec..e9e1cfd 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -70,6 +70,7 @@ static LIST_HEAD (stack_used);
/* List of the threads with user provided stacks in use. */
LIST_HEAD (__stack_user);
+hidden_def (__stack_user)
/* Number of threads running. */
static unsigned int nptl_nthreads = 1;
diff --git a/nptl/events.c b/nptl/events.c
index 8232d0c..df97e54 100644
--- a/nptl/events.c
+++ b/nptl/events.c
@@ -25,8 +25,10 @@ void
__nptl_create_event (void)
{
}
+hidden_def (__nptl_create_event)
void
__nptl_death_event (void)
{
}
+hidden_def (__nptl_death_event)
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index adca051..c6c1e49 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -42,7 +42,8 @@ extern size_t __static_tls_size attribute_hidden;
extern size_t __static_tls_align attribute_hidden;
/* Thread descriptor handling. */
-extern list_t __stack_user attribute_hidden;
+extern list_t __stack_user;
+hidden_proto (__stack_user)
/* Attribute handling. */
extern struct pthread_attr *__attr_list attribute_hidden;
@@ -57,8 +58,8 @@ extern int __current_sigrtmax attribute_hidden;
extern int __concurrency_level attribute_hidden;
/* Thread-local data key handling. */
-extern struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX]
- attribute_hidden;
+extern struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX];
+hidden_proto (__pthread_keys)
/* The library can run in debugging mode where it performs a lot more
tests. */
@@ -134,8 +135,10 @@ extern int __pthread_attr_init_2_0 (pthread_attr_t *attr);
/* Event handlers for libthread_db interface. */
-extern void __nptl_create_event (void) attribute_hidden;
-extern void __nptl_death_event (void) attribute_hidden;
+extern void __nptl_create_event (void);
+extern void __nptl_death_event (void);
+hidden_proto (__nptl_create_event)
+hidden_proto (__nptl_death_event)
/* Namespace save aliases. */
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 451a9b3..5fef400 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -38,10 +38,10 @@ static int start_thread_debug (void *arg);
int __pthread_debug;
/* Globally enabled events. */
-td_thr_events_t __nptl_threads_events attribute_hidden;
+static td_thr_events_t __nptl_threads_events;
/* Pointer to descriptor with the last event. */
-struct pthread *__nptl_last_event attribute_hidden;
+static struct pthread *__nptl_last_event;
/* Code to allocate and deallocate a stack. */
@@ -53,8 +53,12 @@ struct pthread *__nptl_last_event attribute_hidden;
/* Table of the key information. */
-struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX];
+struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX]
+ __attribute__ ((section (".bss")));
+hidden_def (__pthread_keys)
+/* This is for libthread_db only. */
+const int __pthread_pthread_sizeof_descr = sizeof (struct pthread);
struct pthread *
__find_in_stack_list (pd)
diff --git a/nptl/pthread_key_create.c b/nptl/pthread_key_create.c
index 7a073f2..3a49c09 100644
--- a/nptl/pthread_key_create.c
+++ b/nptl/pthread_key_create.c
@@ -21,13 +21,13 @@
#include "pthreadP.h"
-/* Internal mutex for __pthread_kyes table handling. */
+/* Internal mutex for __pthread_keys table handling. */
lll_lock_t __pthread_keys_lock = LLL_LOCK_INITIALIZER;
/* For debugging purposes put the maximum number of keys in a variable. */
-const int __linuxthreads_pthread_keys_max = PTHREAD_KEYS_MAX;
-const int __linuxthreads_pthread_key_2ndlevel_size = PTHREAD_KEY_2NDLEVEL_SIZE;
+const int __pthread_pthread_keys_max = PTHREAD_KEYS_MAX;
+const int __pthread_pthread_key_2ndlevel_size = PTHREAD_KEY_2NDLEVEL_SIZE;
int
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
new file mode 100644
index 0000000..5d3fd84
--- /dev/null
+++ b/nptl_db/ChangeLog
@@ -0,0 +1,6 @@
+2002-12-02 Roland McGrath <roland@redhat.com>
+
+ * td_symbol_list.c (symbol_list_arr): pthread_keys -> __pthread_keys
+
+ * td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Fetch inferior registers to
+ see its %gs value, not our own.
diff --git a/nptl_db/td_symbol_list.c b/nptl_db/td_symbol_list.c
index 1be7001..f6ba917 100644
--- a/nptl_db/td_symbol_list.c
+++ b/nptl_db/td_symbol_list.c
@@ -30,7 +30,7 @@ static const char *symbol_list_arr[] =
[SYM_PTHREAD_NTHREADS] = "nptl_nthreads",
[SYM_PTHREAD_STACK_USED] = "stack_used",
[SYM_PTHREAD_STACK_USER] = "__stack_user",
- [SYM_PTHREAD_KEYS] = "pthread_keys",
+ [SYM_PTHREAD_KEYS] = "__pthread_keys",
[SYM_PTHREAD_KEYS_MAX] = "__pthread_pthread_keys_max",
[SYM_PTHREAD_SIZEOF_DESCR] = "__pthread_pthread_sizeof_descr",
[SYM_PTHREAD_CREATE_EVENT] = "__nptl_create_event",
diff --git a/nptl_db/td_ta_map_lwp2thr.c b/nptl_db/td_ta_map_lwp2thr.c
index 326b9ee..2097194 100644
--- a/nptl_db/td_ta_map_lwp2thr.c
+++ b/nptl_db/td_ta_map_lwp2thr.c
@@ -20,6 +20,7 @@
#include "thread_dbP.h"
#include <tls.h>
+#include <sys/reg.h>
td_err_e
@@ -31,8 +32,12 @@ td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
if (! ta_ok (ta))
return TD_BADTA;
+ prgregset_t regs;
+ if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
+ return TD_ERR;
+
/* Get the thread area for the addressed thread. */
- if (ps_get_thread_area (ta->ph, lwpid, TLS_GET_GS () >> 3, &th->th_unique)
+ if (ps_get_thread_area (ta->ph, lwpid, regs[GS] >> 3, &th->th_unique)
!= PS_OK)
return TD_ERR; /* XXX Other error value? */
diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c
index 7634b1e..3687624 100644
--- a/sysdeps/hppa/fpu/fesetround.c
+++ b/sysdeps/hppa/fpu/fesetround.c
@@ -31,7 +31,7 @@ fesetround (int round)
/* Get the current status word. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= ~FE_UPWARD;
+ sw[0] &= ~FE_DOWNWARD;
sw[0] |= round;
__asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));