+2002-07-16 Ulrich Drepper <drepper@redhat.com>
+
+ * td_thr_clear_event.c: Yet more changes to help with TLS-enabled
+ libpthread.
+ * td_thr_event_enable.c: Likewise.
+ * td_thr_event_getmsg.c: Likewise.
+ * td_thr_set_event.c: Likewise.
+ * td_thr_setfpregs.c: Likewise.
+ * td_thr_setgregs.c: Likewise.
+ * td_thr_tsd.c: Likewise.
+ * td_thr_validate.c: Likewise.
+
2002-07-15 Ulrich Drepper <drepper@redhat.com>
* td_ta_thr_iter.c: Some more changes to enable using TLS-enabled
/* Disable specific event for thread.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
LOG ("td_thr_clear_event");
+ /* If the thread descriptor has not yet been constructed do not do
+ anything. */
+ if (th->th_unique == NULL)
+ return TD_OK;
+
/* Write the new value into the thread data structure. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
/* Enable event process-wide.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
LOG ("td_thr_event_enable");
/* Write the new value into the thread data structure. */
-if (th->th_unique != NULL)
- if (ps_pdwrite (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct, p_report_events)),
- &onoff, sizeof (int)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
+ if (th->th_unique != NULL)
+ if (ps_pdwrite (th->th_ta_p->ph,
+ ((char *) th->th_unique
+ + offsetof (struct _pthread_descr_struct,
+ p_report_events)),
+ &onoff, sizeof (int)) != PS_OK)
+ return TD_ERR; /* XXX Other error value? */
return TD_OK;
}
/* Retrieve event.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
LOG ("td_thr_event_getmsg");
+ /* If the thread descriptor has not yet been created there cannot be
+ any event. */
+ if (th->th_unique == NULL)
+ return TD_NOMSG;
+
/* Read the even structure from the target. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
/* Enable specific event for thread.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
LOG ("td_thr_set_event");
+ /* What shall we do if no thread descriptor exists but the user
+ wants to set an event? */
+ if (th->th_unique == NULL)
+ return TD_NOTALLOC;
+
/* Write the new value into the thread data structure. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
/* Set a thread's floating-point register set.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
td_err_e
td_thr_setfpregs (const td_thrhandle_t *th, const prfpregset_t *fpregs)
{
- struct _pthread_descr_struct pds;
+ struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 };
LOG ("td_thr_setfpregs");
/* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+ if (th->th_unique != NULL
+ && ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
return TD_ERR;
/* Set a thread's general register set.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ 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.
td_err_e
td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs)
{
- struct _pthread_descr_struct pds;
+ struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 };
LOG ("td_thr_setgregs");
/* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+ if (th->th_unique != NULL
+ && ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
return TD_ERR;
LOG ("td_thr_tsd");
+ /* If there is no thread descriptor there cannot be any thread
+ specific data. */
+ if (th->th_unique == NULL)
+ return TD_BADKEY;
+
/* Get the thread descriptor. */
if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
LOG ("td_thr_validate");
+ /* A special case: if the program just starts up the handle is
+ NULL. */
+ if (th->th_unique == NULL)
+ return TD_OK;
+
/* Now get all descriptors, one after the other. */
for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
{
+2002-07-16 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/th_TH: Change tel_dom_fmt.
+ Patch by Theppitak Karoonboonyanan <thep@links.nectec.or.th>.
+
2002-07-11 Ulrich Drepper <drepper@redhat.com>
* charmaps/ISO-8859-11: New file.
LC_TELEPHONE
tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
<U006C>"
-tel_dom_fmt "<U0028><U0025><U0041><U0029><U0025><U006C>"
+tel_dom_fmt "<U0030><U002D><U0025><U0061><U0025><U006C>"
int_select "<U0030><U0030><U0031>"
int_prefix "<U0036><U0036>"
END LC_TELEPHONE