about summary refs log tree commit diff
path: root/nptl_db/td_ta_event_addr.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-09-09 07:01:01 +0000
committerRoland McGrath <roland@gnu.org>2003-09-09 07:01:01 +0000
commit7f08f55a9f88d23fcfbf1fed00f4d5a094e5fffc (patch)
tree5796d7f5d713c3c264a70a6039b0ba52e262b06f /nptl_db/td_ta_event_addr.c
parent416be7f049391ce421d9b12a2c3b81bb3cad9f58 (diff)
downloadglibc-7f08f55a9f88d23fcfbf1fed00f4d5a094e5fffc.tar.gz
glibc-7f08f55a9f88d23fcfbf1fed00f4d5a094e5fffc.tar.xz
glibc-7f08f55a9f88d23fcfbf1fed00f4d5a094e5fffc.zip
* sysdeps/unix/sysv/linux/speed.c
	(cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED].
	(cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED].
	* sysdeps/unix/sysv/linux/bits/termios.h
	(_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
Diffstat (limited to 'nptl_db/td_ta_event_addr.c')
-rw-r--r--nptl_db/td_ta_event_addr.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/nptl_db/td_ta_event_addr.c b/nptl_db/td_ta_event_addr.c
index 906835dc73..37196e643f 100644
--- a/nptl_db/td_ta_event_addr.c
+++ b/nptl_db/td_ta_event_addr.c
@@ -1,5 +1,5 @@
 /* Get event address.
-   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@redhat.com>, 1999.
 
@@ -22,10 +22,12 @@
 
 
 td_err_e
-td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr)
+td_ta_event_addr (const td_thragent_t *ta_arg,
+		  td_event_e event, td_notify_t *addr)
 {
-  td_err_e res = TD_NOEVENT;
-  int idx = -1;
+  td_thragent_t *const ta = (td_thragent_t *) ta_arg;
+  td_err_e err;
+  psaddr_t taddr;
 
   LOG ("td_ta_event_addr");
 
@@ -36,34 +38,24 @@ td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr)
   switch (event)
     {
     case TD_CREATE:
-      idx = SYM_PTHREAD_CREATE_EVENT;
+      err = DB_GET_SYMBOL (taddr, ta, __nptl_create_event);
       break;
 
     case TD_DEATH:
-      idx = SYM_PTHREAD_DEATH_EVENT;
+      err = DB_GET_SYMBOL (taddr, ta, __nptl_death_event);
       break;
 
     default:
       /* Event cannot be handled.  */
-      break;
+      return TD_NOEVENT;
     }
 
-  /* Now get the address.  */
-  if (idx != -1)
+  if (err == TD_OK)
     {
-      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;
+      /* Success, we got the address.  */
+      addr->type = NOTIFY_BPT;
+      addr->u.bptaddr = taddr;
     }
 
-  return res;
+  return err;
 }