diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 03:13:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 03:13:04 +0000 |
commit | a9f5aa1cc96fc2c71f19a9c3e9dcbee0e78f83ca (patch) | |
tree | 2c5d251bdfd06d0a76cec9fc507b1873b4bbbdad /libpthread/linuxthreads_db | |
parent | fd6dde5a19092be5bb1990dadd5c595d2ed0b3aa (diff) |
rename current stable linuxthreads to linuxthreads.old to prepare for import of latest glibc version
Diffstat (limited to 'libpthread/linuxthreads_db')
46 files changed, 0 insertions, 2967 deletions
diff --git a/libpthread/linuxthreads_db/Banner b/libpthread/linuxthreads_db/Banner deleted file mode 100644 index 6f4f3f818..000000000 --- a/libpthread/linuxthreads_db/Banner +++ /dev/null @@ -1 +0,0 @@ -libthread_db work sponsored by Alpha Processor Inc diff --git a/libpthread/linuxthreads_db/Makefile b/libpthread/linuxthreads_db/Makefile deleted file mode 100644 index f92f205a5..000000000 --- a/libpthread/linuxthreads_db/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# Makefile for uClibc -# -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -TOPDIR=../../ - -top_srcdir=$(TOPDIR) -top_builddir=../../ -include $(top_builddir)Rules.mak -all: libs -include Makefile.in -include $(top_srcdir)Makerules diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in deleted file mode 100644 index a066edd0e..000000000 --- a/libpthread/linuxthreads_db/Makefile.in +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for uClibc -# -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> -# -# 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)\"" - -# Remove any -z defs since this lib will have undefined symbols -LDFLAGS:=$(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols - -ifeq ($(PTHREADS_DEBUG_SUPPORT),y) -STRIP_FLAGS:=-X --strip-debug -R .note -R .comment -endif - -DOMULTI=n - -LIB_NAME:=libthread_db -libthread_db_FULL_NAME:=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so - -MAJOR_VERSION:=1 - -libthread_db_DIR:=$(top_srcdir)libpthread/linuxthreads_db -libthread_db_OUT:=$(top_builddir)libpthread/linuxthreads_db - -libthread_db_SRC:=$(wildcard $(libthread_db_DIR)/*.c) - -libthread_db_OBJ:=$(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC)) - -libthread_db-a-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ) -libthread_db-so-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ:.o=.os) - -libthread_db-multi-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_SRC) - -objclean-y+=libthread_db_clean - -lib-a-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.a -lib-so-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.so diff --git a/libpthread/linuxthreads_db/Versions b/libpthread/linuxthreads_db/Versions deleted file mode 100644 index 4ca8042c1..000000000 --- a/libpthread/linuxthreads_db/Versions +++ /dev/null @@ -1,21 +0,0 @@ -libthread_db { - GLIBC_2.1.3 { - # t* - td_init; td_log; td_ta_clear_event; td_ta_delete; td_ta_enable_stats; - td_ta_event_addr; td_ta_event_getmsg; td_ta_get_nthreads; td_ta_get_ph; - td_ta_get_stats; td_ta_map_id2thr; td_ta_map_lwp2thr; td_ta_new; - td_ta_reset_stats; td_ta_set_event; td_ta_setconcurrency; - td_ta_thr_iter; td_ta_tsd_iter; td_thr_clear_event; td_thr_dbresume; - td_thr_dbsuspend; td_thr_event_enable; td_thr_event_getmsg; - td_thr_get_info; td_thr_getfpregs; td_thr_getgregs; td_thr_getxregs; - td_thr_getxregsize; td_thr_set_event; td_thr_setfpregs; td_thr_setgregs; - td_thr_setprio; td_thr_setsigpending; td_thr_setxregs; td_thr_sigsetmask; - td_thr_tsd; td_thr_validate; - } - GLIBC_2.2.3 { - td_symbol_list; - } - GLIBC_2.3 { - td_thr_tls_get_addr; - } -} diff --git a/libpthread/linuxthreads_db/proc_service.h b/libpthread/linuxthreads_db/proc_service.h deleted file mode 100644 index 74136c03e..000000000 --- a/libpthread/linuxthreads_db/proc_service.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 1999 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* The definitions in this file must correspond to those in the debugger. */ -#include <sys/procfs.h> - -typedef enum -{ - PS_OK, /* generic "call succeeded" */ - PS_ERR, /* generic. */ - PS_BADPID, /* bad process handle */ - PS_BADLID, /* bad lwp identifier */ - PS_BADADDR, /* bad address */ - PS_NOSYM, /* p_lookup() could not find given symbol */ - PS_NOFREGS - /* - * FPU register set not available for given - * lwp - */ -} ps_err_e; - - -struct ps_prochandle; /* user defined. */ - - -extern ps_err_e ps_pdread(struct ps_prochandle *, - psaddr_t, void *, size_t); -extern ps_err_e ps_pdwrite(struct ps_prochandle *, - psaddr_t, const void *, size_t); -extern ps_err_e ps_ptread(struct ps_prochandle *, - psaddr_t, void *, size_t); -extern ps_err_e ps_ptwrite(struct ps_prochandle *, - psaddr_t, const void *, size_t); - -extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *, - const char *object_name, const char *sym_name, psaddr_t *sym_addr); - - -extern ps_err_e ps_lgetregs(struct ps_prochandle *, - lwpid_t, prgregset_t); -extern ps_err_e ps_lsetregs(struct ps_prochandle *, - lwpid_t, const prgregset_t); -extern ps_err_e ps_lgetfpregs(struct ps_prochandle *, - lwpid_t, prfpregset_t *); -extern ps_err_e ps_lsetfpregs(struct ps_prochandle *, - lwpid_t, const prfpregset_t *); - -extern pid_t ps_getpid (struct ps_prochandle *); - - -extern ps_err_e ps_pstop (const struct ps_prochandle *); -extern ps_err_e ps_pcontinue (const struct ps_prochandle *); - -extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t); -extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t); diff --git a/libpthread/linuxthreads_db/td_init.c b/libpthread/linuxthreads_db/td_init.c deleted file mode 100644 index d714f1ba0..000000000 --- a/libpthread/linuxthreads_db/td_init.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Initialization function of thread debugger support library. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "thread_dbP.h" - -int __td_debug; - - -td_err_e -td_init (void) -{ - /* XXX We have to figure out what has to be done. */ - LOG ("td_init"); - return TD_OK; -} diff --git a/libpthread/linuxthreads_db/td_log.c b/libpthread/linuxthreads_db/td_log.c deleted file mode 100644 index 025273a63..000000000 --- a/libpthread/linuxthreads_db/td_log.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Noop, left for historical reasons. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "thread_dbP.h" - - -td_err_e -td_log (void) -{ - /* This interface is deprecated in the Sun interface. We provide it - for compatibility but don't do anything ourself. We might in - future do some logging if this seems reasonable. */ - LOG ("td_log"); - return TD_OK; -} diff --git a/libpthread/linuxthreads_db/td_symbol_list.c b/libpthread/linuxthreads_db/td_symbol_list.c deleted file mode 100644 index 779332b9d..000000000 --- a/libpthread/linuxthreads_db/td_symbol_list.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Return list of symbols the library can request. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <assert.h> -#include "thread_dbP.h" - - -static const char *symbol_list_arr[] = -{ - [PTHREAD_THREADS_EVENTS] = "__pthread_threads_events", - [PTHREAD_LAST_EVENT] = "__pthread_last_event", - [PTHREAD_HANDLES_NUM] = "__pthread_handles_num", - [PTHREAD_HANDLES] = "__pthread_handles", - [PTHREAD_KEYS] = "pthread_keys", - [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_INITIAL_REPORT_EVENTS] = "__linuxthreads_initial_report_events", - [LINUXTHREADS_VERSION] = "__linuxthreads_version", - [NUM_MESSAGES] = NULL -}; - - -const char ** -td_symbol_list (void) -{ - return symbol_list_arr; -} - - -int -td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr) -{ - assert (idx >= 0 && idx < NUM_MESSAGES); - return ps_pglobal_lookup (ps, LIBPTHREAD_SO, symbol_list_arr[idx], sym_addr); -} diff --git a/libpthread/linuxthreads_db/td_ta_clear_event.c b/libpthread/linuxthreads_db/td_ta_clear_event.c deleted file mode 100644 index bdbcf47aa..000000000 --- a/libpthread/linuxthreads_db/td_ta_clear_event.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Globally disable events. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "thread_dbP.h" - - -td_err_e -td_ta_clear_event (ta, event) - const td_thragent_t *ta; - td_thr_events_t *event; -{ - td_thr_events_t old_event; - int i; - - LOG ("td_ta_clear_event"); - - /* Test whether the TA parameter is ok. */ - if (! ta_ok (ta)) - return TD_BADTA; - - /* 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) - return TD_ERR; /* XXX Other error value? */ - - /* Remove the set bits in. */ - for (i = 0; i < TD_EVENTSIZE; ++i) - old_event.event_bits[i] &= ~event->event_bits[i]; - - /* 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) - return TD_ERR; /* XXX Other error value? */ - - return TD_OK; -} diff --git a/libpthread/linuxthreads_db/td_ta_delete.c b/libpthread/linuxthreads_db/td_ta_delete.c deleted file mode 100644 index 0e6ec17d0..000000000 --- a/libpthread/linuxthreads_db/td_ta_delete.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Detach to target process. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <stdlib.h> - -#include "thread_dbP.h" - - -td_err_e -td_ta_delete (td_thragent_t *ta) -{ - LOG ("td_ta_delete"); - - /* Safety check. */ - if (ta == NULL || __td_agent_list == NULL) - return TD_BADTA; - - /* Remove the handle from the list. */ - if (ta == __td_agent_list->ta) - /* It's the first element of the list. */ - __td_agent_list = __td_agent_list->next; - else - { - /* We have to search for it. */ - struct agent_list *runp = __td_agent_list; - - while (runp->next != NULL && runp->next->ta != ta) - runp = runp->next; - - if (runp->next == NULL) - /* It's not a valid decriptor since it is not in the list. */ - return TD_BADTA; - - runp->next = runp->next->next; - } - - /* The handle was allocated in `td_ta_new'. */ - free (ta); - - return TD_OK; -} diff --git a/libpthread/linuxthreads_db/td_ta_enable_stats.c b/libpthread/linuxthreads_db/td_ta_enable_stats.c deleted file mode 100644 index 1d4c34a8d..000000000 --- a/libpthread/linuxthreads_db/td_ta_enable_stats.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Enable collection of statistics for process. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "thread_dbP.h" - - -td_err_e -td_ta_enable_stats (const td_thragent_t *ta, int enable) -{ - /* XXX We have to figure out what has to be done. */ - LOG ("td_ta_enable_stats"); - - /* Test whether the TA parameter is ok. */ - if (! ta_ok (ta)) - return TD_BADTA; - - return TD_OK; -} diff --git a/libpthread/linuxthreads_db/td_ta_event_addr.c b/libpthread/linuxthreads_db/td_ta_event_addr.c deleted file mode 100644 index 8bce35ae8..000000000 --- a/libpthread/linuxthreads_db/td_ta_event_addr.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Get event address. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "thread_dbP.h" - - -td_err_e -td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr) -{ - td_err_e res = TD_NOEVENT; - int idx = -1; - - LOG ("td_ta_event_addr"); - - /* Test whether the TA parameter is ok. */ - if (! ta_ok (ta)) - return TD_BADTA; - - switch (event) - { - case TD_CREATE: - idx = LINUXTHREADS_CREATE_EVENT; - break; - - case TD_DEATH: - idx = LINUXTHREADS_DEATH_EVENT; - break; - - case TD_REAP: - idx = LINUXTHREADS_REAP_EVENT; - break; - - default: - /* Event cannot be handled. */ - break; - } - - /* Now get the address. */ - if (idx != -1) - { - psaddr_t taddr; - - if (td_lookup (ta->ph, idx, &taddr) == PS_OK) - { - /* Success, we got the address. */ - addr->type = NOTIFY_BPT; - addr->u.bptaddr = taddr; - - res = TD_OK; - } - else - res = TD_ERR; - } - - return res; -} diff --git a/libpthread/linuxthreads_db/td_ta_event_getmsg.c b/libpthread/linuxthreads_db/td_ta_event_getmsg.c deleted file mode 100644 index ec68ae0e2..000000000 --- a/libpthread/linuxthreads_db/td_ta_event_getmsg.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Retrieve event. - Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <stddef.h> -#include <string.h> - -#include "thread_dbP.h" -#include "../linuxthreads/internals.h" - - -td_err_e -td_ta_event_getmsg (const td_thragent_t *ta, td_event_msg_t *msg) -{ - /* XXX I cannot think of another way but using a static variable. */ - static td_thrhandle_t th; - td_eventbuf_t event; - psaddr_t addr; - - LOG ("td_ta_event_getmsg"); - - /* Test whether the TA parameter is ok. */ - if (! ta_ok (ta)) - return TD_BADTA; - - /* Get the pointer to the thread descriptor with the last event. */ - if (ps_pdread (ta->ph, ta->pthread_last_event, - &addr, sizeof (void *)) != PS_OK) - return TD_ERR; /* XXX Other error value? */ - - /* If the pointer is NULL no event occurred. */ - if (addr == 0) - return TD_NOMSG; - - /* Read the even structure from the target. */ - if (ps_pdread (ta->ph, - ((char *) addr - + offsetof (struct _pthread_descr_struct, p_eventbuf)), - &event, sizeof (td_eventbuf_t)) != PS_OK) - return TD_ERR; /* XXX Other error value? */ - - /* Check whether an event occurred. */ - if (event.eventnum == TD_EVENT_NONE) - { - /* Oh well, this means the last event was already read. So - we have to look for any other event. */ - struct pthread_handle_struct handles[ta->pthread_threads_max]; - int num; - int i; - - /* Read the number of currently active threads. */ - if (ps_pdread (ta->ph, ta->pthread_handles_num, &num, sizeof (int)) - != PS_OK) - return TD_ERR; /* XXX Other error value? */ - - /* Now read the handles. */ - if (ps_pdread (ta->ph, ta->handles, handles, - ta->pthread_threads_max * sizeof (handles[0])) != PS_OK) - return TD_ERR; /* XXX Other error value? */ - - for (i = 0; i < ta->pthread_threads_max && num > 0; ++i) - { - if (handles[i].h_descr == NULL) - /* No entry here. */ - continue; - - /* First count this active thread. */ - --num; - - if (handles[i].h_descr == addr) |