summaryrefslogtreecommitdiffstats
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/Makefile76
-rw-r--r--libpthread/linuxthreads.old_db/Makefile4
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in67
-rw-r--r--libpthread/linuxthreads.old_db/Versions3
-rw-r--r--libpthread/linuxthreads.old_db/td_symbol_list.c13
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_clear_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_getmsg.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_id2thr.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_new.c5
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_set_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_thr_iter.c3
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_tsd_iter.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_clear_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_set_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c5
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tsd.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_validate.c1
-rw-r--r--libpthread/linuxthreads.old_db/thread_db.h14
-rw-r--r--libpthread/linuxthreads.old_db/thread_dbP.h2
-rw-r--r--libpthread/linuxthreads_db/CVS/Entries2
-rw-r--r--libpthread/linuxthreads_db/Makefile4
-rw-r--r--libpthread/linuxthreads_db/Makefile.in6
-rw-r--r--libpthread/nptl/Rules.mak16
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-initfini.s137
-rw-r--r--libpthread/nptl_db/Makefile69
-rw-r--r--libpthread/nptl_db/td_ta_new.c8
27 files changed, 114 insertions, 350 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile
index 96631bfd0..c8dc9b466 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -1,71 +1,13 @@
-# Makefile for uClibc's pthread library
+# Makefile for uClibc
#
-# Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-ALL_SUBDIRS = $(PTNAME) $(PTNAME)_db
-DIRS = $(PTNAME)
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- DIRS += $(PTNAME)_db
-endif
-
-all: subdirs
-
-# NPTL does not have a generic pthreadtypes.h
-# and each arch has to have both semaphore.h/pthreadtypes.h ?
-headers:
- $(LN) -sf $(PTDIR)/sysdeps/pthread/pthread.h $(TOPDIR)include/
- $(LN) -sf $(PTDIR)/semaphore.h $(TOPDIR)include/
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- $(LN) -sf $(PTDIR)_db/thread_db.h $(TOPDIR)include/
-endif
-ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
- $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(TOPDIR)include/bits/
-else
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(TOPDIR)include/bits/
-endif
-
-tags:
- ctags -R
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-headers_clean:
- $(RM) $(TOPDIR)include/pthread.h $(TOPDIR)include/semaphore.h \
- $(TOPDIR)include/thread_db.h \
- $(TOPDIR)include/bits/pthreadtypes.h $(TOPDIR)include/bits/semaphore.h \
- $(TOPDIR)include/bits/libc-lock.h $(TOPDIR)include/bits/stdio-lock
-ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
- $(RM) $(PTNAME)/version.h $(PTDIR)/banner.h \
- $(PTDIR)/sysdeps/unix/sysv/linux/rtld-libc-lowlevellock.c
-endif
-
-clean: subdirs_clean headers_clean
-.PHONY: dummy
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libpthread/linuxthreads.old_db/Makefile b/libpthread/linuxthreads.old_db/Makefile
index f92f205a5..f9100219a 100644
--- a/libpthread/linuxthreads.old_db/Makefile
+++ b/libpthread/linuxthreads.old_db/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index 0e29c7c18..bad600d89 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -5,39 +5,60 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-#CFLAGS+=$(SSP_ALL_CFLAGS)
-
-PT_MAJOR_VERSION:=$(MAJOR_VERSION)
# Get the thread include dependencies and shared object name
-CFLAGS+=-DLIBPTHREAD_SO="\"libpthread.so.$(PT_MAJOR_VERSION)\""
+CFLAGS-linuxthreads.old_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-# Remove any -z defs since this lib will have undefined symbols
-LDFLAGS:=$(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-STRIP_FLAGS:=-X --strip-debug -R .note -R .comment
-endif
+LIBS-libthread_db.so := $(LIBS)
-DOMULTI=n
+libthread_db_FULL_NAME := libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-LIB_NAME:=libthread_db
-libthread_db_FULL_NAME:=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads.old_db
+libthread_db_OUT := $(top_builddir)libpthread/linuxthreads.old_db
-MAJOR_VERSION:=1
+libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
-libthread_db_DIR:=$(top_srcdir)libpthread/linuxthreads.old_db
-libthread_db_OUT:=$(top_builddir)libpthread/linuxthreads.old_db
+libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+
+ifeq ($(DOPIC),y)
+libthread_db-a-y := $(libthread_db_OBJ:.o=.os)
+else
+libthread_db-a-y := $(libthread_db_OBJ)
+endif
+libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
-libthread_db_SRC:=$(wildcard $(libthread_db_DIR)/*.c)
+libthread_db-multi-y := $(libthread_db_SRC)
+
+lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
+lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
+objclean-y += libthread_db_clean
+headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
+headers_clean-y += linuxthreads_db_headers_clean
+
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc)
+else
+$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc)
+endif
+ $(call link.so,$(libthread_db_FULL_NAME),1)
-libthread_db_OBJ:=$(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+$(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
-libthread_db-a-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ)
-libthread_db-so-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ:.o=.os)
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
-libthread_db-multi-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_SRC)
+linuxthreads_db_headers:
+ $(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
-objclean-y+=libthread_db_clean
+linuxthreads_db_headers_clean:
+ $(RM) $(top_builddir)include/thread_db.h
-lib-a-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.a
-lib-so-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.so
+libthread_db_clean:
+ $(RM) $(libthread_db_OUT)/*.{o,os,a}
diff --git a/libpthread/linuxthreads.old_db/Versions b/libpthread/linuxthreads.old_db/Versions
index 4ca8042c1..063493c67 100644
--- a/libpthread/linuxthreads.old_db/Versions
+++ b/libpthread/linuxthreads.old_db/Versions
@@ -18,4 +18,7 @@ libthread_db {
GLIBC_2.3 {
td_thr_tls_get_addr;
}
+ GLIBC_2.3.3 {
+ td_thr_tlsbase;
+ }
}
diff --git a/libpthread/linuxthreads.old_db/td_symbol_list.c b/libpthread/linuxthreads.old_db/td_symbol_list.c
index 779332b9d..599c04596 100644
--- a/libpthread/linuxthreads.old_db/td_symbol_list.c
+++ b/libpthread/linuxthreads.old_db/td_symbol_list.c
@@ -1,5 +1,5 @@
/* Return list of symbols the library can request.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
@@ -21,6 +21,11 @@
#include <assert.h>
#include "thread_dbP.h"
+#ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define DOT "." /* PPC64 requires . prefix on code symbols. */
+#else
+# define DOT /* No prefix. */
+#endif
static const char *symbol_list_arr[] =
{
@@ -32,9 +37,9 @@ static const char *symbol_list_arr[] =
[LINUXTHREADS_PTHREAD_THREADS_MAX] = "__linuxthreads_pthread_threads_max",
[LINUXTHREADS_PTHREAD_KEYS_MAX] = "__linuxthreads_pthread_keys_max",
[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] = "__linuxthreads_pthread_sizeof_descr",
- [LINUXTHREADS_CREATE_EVENT] = "__linuxthreads_create_event",
- [LINUXTHREADS_DEATH_EVENT] = "__linuxthreads_death_event",
- [LINUXTHREADS_REAP_EVENT] = "__linuxthreads_reap_event",
+ [LINUXTHREADS_CREATE_EVENT] = DOT "__linuxthreads_create_event",
+ [LINUXTHREADS_DEATH_EVENT] = DOT "__linuxthreads_death_event",
+ [LINUXTHREADS_REAP_EVENT] = DOT "__linuxthreads_reap_event",
[LINUXTHREADS_INITIAL_REPORT_EVENTS] = "__linuxthreads_initial_report_events",
[LINUXTHREADS_VERSION] = "__linuxthreads_version",
[NUM_MESSAGES] = NULL
diff --git a/libpthread/linuxthreads.old_db/td_ta_clear_event.c b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
index bdbcf47aa..cbb7ddc97 100644
--- a/libpthread/linuxthreads.old_db/td_ta_clear_event.c
+++ b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
@@ -1,5 +1,5 @@
/* Globally disable events.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -37,7 +37,7 @@ td_ta_clear_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Remove the set bits in. */
@@ -46,7 +46,7 @@ td_ta_clear_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
index c004a5b79..ba535da79 100644
--- a/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
+++ b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
@@ -22,7 +22,6 @@
#include <string.h>
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c b/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
index 30f272af6..c57f25a5a 100644
--- a/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
+++ b/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c b/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
index 5bdf970e4..2be1e3de5 100644
--- a/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
+++ b/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_new.c b/libpthread/linuxthreads.old_db/td_ta_new.c
index 9bf926719..2b0b68bf0 100644
--- a/libpthread/linuxthreads.old_db/td_ta_new.c
+++ b/libpthread/linuxthreads.old_db/td_ta_new.c
@@ -1,5 +1,5 @@
/* Attach to target process.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -128,8 +128,7 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
goto free_return;
/* Don't let bogons in the inferior make us mess ourselves. */
if ((*ta)->sizeof_descr > sizeof (struct _pthread_descr_struct))
- (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
-
+ (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
}
/* Now add the new agent descriptor to the list. */
diff --git a/libpthread/linuxthreads.old_db/td_ta_set_event.c b/libpthread/linuxthreads.old_db/td_ta_set_event.c
index 73cf9f405..6edb38e57 100644
--- a/libpthread/linuxthreads.old_db/td_ta_set_event.c
+++ b/libpthread/linuxthreads.old_db/td_ta_set_event.c
@@ -1,5 +1,5 @@
/* Globally enable events.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -37,7 +37,7 @@ td_ta_set_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Or the new bits in. */
@@ -46,7 +46,7 @@ td_ta_set_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_ta_thr_iter.c b/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
index 6cc4bf7c1..771a12de4 100644
--- a/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
+++ b/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
@@ -1,5 +1,5 @@
/* Iterate over a process's threads.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
#include <alloca.h>
static int
diff --git a/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c b/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
index f15b45003..7ad98dd91 100644
--- a/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
+++ b/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
#include <alloca.h>
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_thr_clear_event.c b/libpthread/linuxthreads.old_db/td_thr_clear_event.c
index c027fc09f..147d18037 100644
--- a/libpthread/linuxthreads.old_db/td_thr_clear_event.c
+++ b/libpthread/linuxthreads.old_db/td_thr_clear_event.c
@@ -1,5 +1,5 @@
/* Disable specific event for thread.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -43,7 +43,7 @@ td_thr_clear_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Remove the set bits in. */
@@ -55,7 +55,7 @@ td_thr_clear_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_thr_set_event.c b/libpthread/linuxthreads.old_db/td_thr_set_event.c
index 205b445c7..1e1def511 100644
--- a/libpthread/linuxthreads.old_db/td_thr_set_event.c
+++ b/libpthread/linuxthreads.old_db/td_thr_set_event.c
@@ -1,5 +1,5 @@
/* Enable specific event for thread.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -43,7 +43,7 @@ td_thr_set_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Or the new bits in. */
@@ -55,7 +55,7 @@ td_thr_set_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
index e140b77dc..a28b07450 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
+++ b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
@@ -1,5 +1,5 @@
/* Get address of thread local variable.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2002.
@@ -18,8 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-
-#include "link.h"
+#include <link.h>
#include "thread_dbP.h"
/* Value used for dtv entries for which the allocation is delayed. */
diff --git a/libpthread/linuxthreads.old_db/td_thr_tsd.c b/libpthread/linuxthreads.old_db/td_thr_tsd.c
index 003ed95fe..2ab71c588 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tsd.c
+++ b/libpthread/linuxthreads.old_db/td_thr_tsd.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_thr_validate.c b/libpthread/linuxthreads.old_db/td_thr_validate.c
index 31169ef60..2cf7727b6 100644
--- a/libpthread/linuxthreads.old_db/td_thr_validate.c
+++ b/libpthread/linuxthreads.old_db/td_thr_validate.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/thread_db.h b/libpthread/linuxthreads.old_db/thread_db.h
index f0d9aa7c3..c115399a3 100644
--- a/libpthread/linuxthreads.old_db/thread_db.h
+++ b/libpthread/linuxthreads.old_db/thread_db.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread
+ Copyright (C) 1999,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,8 +53,10 @@ typedef enum
TD_MALLOC, /* Out of memory. */
TD_PARTIALREG, /* Not entire register set was read or written. */
TD_NOXREGS, /* X register set not available for given thread. */
- TD_NOTALLOC, /* TLS memory not yet allocated. */
- TD_VERSION /* Version if libpthread and libthread_db do not match. */
+ TD_TLSDEFER, /* Thread has not yet allocated TLS for given module. */
+ TD_NOTALLOC = TD_TLSDEFER,
+ TD_VERSION, /* Version if libpthread and libthread_db do not match. */
+ TD_NOTLS /* There is TLS segment in the given module. */
} td_err_e;
@@ -402,6 +405,11 @@ extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th,
const void *__addr);
+/* Get address of the given module's TLS storage area for the given thread. */
+extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th,
+ unsigned long int __modid,
+ psaddr_t *__base);
+
/* Get address of thread local variable. */
extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th,
void *__map_address, size_t __offset,
diff --git a/libpthread/linuxthreads.old_db/thread_dbP.h b/libpthread/linuxthreads.old_db/thread_dbP.h
index a979a44a9..257beb2e9 100644
--- a/libpthread/linuxthreads.old_db/thread_dbP.h
+++ b/libpthread/linuxthreads.old_db/thread_dbP.h
@@ -8,7 +8,7 @@
#include <unistd.h>
#include "proc_service.h"
#include "thread_db.h"
-#include "../linuxthreads.old/internals.h"
+#include "internals.h"
/* Indeces for the symbol names. */
diff --git a/libpthread/linuxthreads_db/CVS/Entries b/libpthread/linuxthreads_db/CVS/Entries
index eed928270..99a94cb65 100644
--- a/libpthread/linuxthreads_db/CVS/Entries
+++ b/libpthread/linuxthreads_db/CVS/Entries
@@ -43,7 +43,7 @@
/td_thr_tls_get_addr.c/1.8/Tue Nov 15 14:20:48 2005//
/td_thr_tlsbase.c/1.4/Tue Nov 15 14:20:48 2005//
/td_thr_tsd.c/1.6/Tue Nov 15 14:20:48 2005//
-/td_thr_validate.c/1.8/Tue Nov 15 14:20:48 2005//
/thread_db.h/1.14/Tue Nov 15 14:20:48 2005//
/thread_dbP.h/1.14/Tue Nov 15 14:20:48 2005//
+/td_thr_validate.c/1.8/Tue Nov 22 18:25:09 2005//
D
diff --git a/libpthread/linuxthreads_db/Makefile b/libpthread/linuxthreads_db/Makefile
index f92f205a5..f9100219a 100644
--- a/libpthread/linuxthreads_db/Makefile
+++ b/libpthread/linuxthreads_db/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in
index ad2401c02..c80e32c53 100644
--- a/libpthread/linuxthreads_db/Makefile.in
+++ b/libpthread/linuxthreads_db/Makefile.in
@@ -7,7 +7,7 @@
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-CFLAGS-linuxthreads_db += -I$(top_srcdir)libpthread -D_GNU_SOURCE
+CFLAGS-linuxthreads_db += -D_GNU_SOURCE
LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
@@ -44,11 +44,13 @@ $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y:.o=.os)
else
-$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) $(libthread_db_OUT)/libthread_db_so.a
endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
+ifneq ($(DOPIC),y)
$(do_strip)
+endif
$(do_ar)
linuxthreads_db_headers:
diff --git a/libpthread/nptl/Rules.mak b/libpthread/nptl/Rules.mak
deleted file mode 100644
index b42995738..000000000
--- a/libpthread/nptl/Rules.mak
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# These names are used for NPTL since we have to build seperate archives
-# for the static and shared objects.
-#
-LIB_NAME := libpthread
-AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
-AR_SO_LIB_NAME := $(TOPDIR)lib/shared_$(LIB_NAME).a
-SO_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CFLAGS-LIBC := $(filter-out -O0 -O1 -Os, $(CFLAGS)) $(PTINC) -O2 \
- -I$(TOPDIR)libpthread/nptl \
- -I$(TOPDIR)ldso/include -std=gnu99
-ASFLAGS-LIBC := $(filter-out -std=gnu99, $(CFLAGS-LIBC)) -D__ASSEMBLER__
-CFLAGS-LIBP := $(CFLAGS-LIBC) -DNOT_IN_libc=1 -DIS_IN_libpthread=1
-ASFLAGS-LIBP := $(filter-out -std=gnu99, $(CFLAGS-LIBP)) -D__ASSEMBLER__
diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.s b/libpthread/nptl/sysdeps/pthread/pt-initfini.s
deleted file mode 100644
index d8e3a7316..000000000
--- a/libpthread/nptl/sysdeps/pthread/pt-initfini.s
+++ /dev/null
@@ -1,137 +0,0 @@
- .file 1 "pt-initfini.c"
- .section .mdebug.abi32
- .previous
- .abicalls
-#APP
-
-#include "defs.h"
-
-/*@HEADER_ENDS*/
-
-/*@TESTS_BEGIN*/
-#NO_APP
- .text
- .align 2
- .globl dummy
- .type dummy, @function
-dummy:
- .set noreorder
- .set nomacro
-
- beq $4,$0,$L6
- move $25,$4
-
- jr $25
- nop
-
-$L6:
- j $31
- nop
-
- .set macro
- .set reorder
-#APP
-
-/*@TESTS_END*/
-
-/*@_init_PROLOG_BEGINS*/
-#NO_APP
- .align 2
- .type call_initialize_minimal, @function
-call_initialize_minimal:
- .set noreorder
- .cpload $25
- .set nomacro
-
- lw $25,%call16(__pthread_initialize_minimal_internal)($28)
- nop
- jr $25
- nop
-
- .set macro
- .set reorder
-#APP
- .section .init
-#NO_APP
- .align 2
- .globl _init
- .type _init, @function
-_init:
- .set noreorder
- .cpload $25
- .set reorder
- addiu $sp,$sp,-32
- sw $31,24($sp)
- .cprestore 16
- lw $25,%got(call_initialize_minimal)($28)
- #nop
- addiu $25,$25,%lo(call_initialize_minimal)
- jalr $25
- lw $28,16($sp)
-#APP
- ALIGN
- END_INIT
-
-/*@_init_PROLOG_ENDS*/
-
-/*@_init_EPILOG_BEGINS*/
- .section .init
-#NO_APP
- lw $31,24($sp)
- #nop
- .set noreorder
- .set nomacro
- j $31
- addiu $sp,$sp,32
- .set macro
- .set reorder
-
-#APP
- END_INIT
-
-/*@_init_EPILOG_ENDS*/
-
-/*@_fini_PROLOG_BEGINS*/
- .section .fini
-#NO_APP
- .align 2
- .globl _fini
- .type _fini, @function
-_fini:
- .set noreorder
- .cpload $25
- .set reorder
- addiu $sp,$sp,-32
- sw $31,24($sp)
- .cprestore 16
-#APP
- ALIGN
- END_FINI
-
-/*@_fini_PROLOG_ENDS*/
-#NO_APP
- lw $25,%call16(i_am_not_a_leaf)($28)
- #nop
- jalr $25
- lw $28,16($sp)
-#APP
-
-/*@_fini_EPILOG_BEGINS*/
- .section .fini
-#NO_APP
- lw $31,24($sp)
- #nop
- .set noreorder
- .set nomacro
- j $31
- addiu $sp,$sp,32
- .set macro
- .set reorder
-
-#APP
- END_FINI
-
-/*@_fini_EPILOG_ENDS*/
-
-/*@TRAILER_BEGINS*/
- .ident "GCC: (GNU) 4.1.0 20050604 (experimental)"
diff --git a/libpthread/nptl_db/Makefile b/libpthread/nptl_db/Makefile
index 54b48be78..f92f205a5 100644
--- a/libpthread/nptl_db/Makefile
+++ b/libpthread/nptl_db/Makefile
@@ -1,66 +1,15 @@
-# Makefile for uClibc's native pthread debug library
-#
-# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com>
+# Makefile for uClibc
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-# Makefile for uClibc
TOPDIR=../../
-include $(TOPDIR)Rules.mak
-
-LIB_NAME=libthread_db
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-ifeq ($(strip $(TARGET_ARCH)),mips)
-CFLAGS := $(CFLAGS:-O1=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
- -std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-else
-CFLAGS := $(CFLAGS:-O0=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
- -std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-endif
-
-# Remove any -z defs since this lib will have undefined symbols
-LDFLAGS := $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
-
-OBJS = $(patsubst %.c, %.o, $(filter-out db_info.c, $(wildcard *.c)))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).1 $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.1 \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).1
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=$(TOPDIR)
+top_builddir=../../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libpthread/nptl_db/td_ta_new.c b/libpthread/nptl_db/td_ta_new.c
index 152c27b5e..bc8caee20 100644
--- a/libpthread/nptl_db/td_ta_new.c
+++ b/libpthread/nptl_db/td_ta_new.c
@@ -21,11 +21,11 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __UCLIBC__
-#include <../nptl/version.h>
-#else
+//#ifdef __UCLIBC__
+//#include <../nptl/version.h>
+//#else
#include <version.h>
-#endif
+//#endif
#include "thread_dbP.h"