bits of RM are cleared.
+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
+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
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.
+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>.
/* 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;
__nptl_create_event (void)
{
}
+hidden_def (__nptl_create_event)
void
__nptl_death_event (void)
{
}
+hidden_def (__nptl_death_event)
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;
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. */
/* 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. */
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. */
/* 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)
#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
--- /dev/null
+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.
[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",
#include "thread_dbP.h"
#include <tls.h>
+#include <sys/reg.h>
td_err_e
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? */
/* 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));