Back to index

glibc  2.9
td_thr_event_enable.c File Reference
#include <stddef.h>
#include "thread_dbP.h"

Go to the source code of this file.


td_err_e td_thr_event_enable (td_thrhandle_t *th, int onoff) const

Function Documentation

td_err_e td_thr_event_enable ( td_thrhandle_t th,
int  onoff 
) const

Definition at line 27 of file td_thr_event_enable.c.

  LOG ("td_thr_event_enable");

  /* Write the new value into the thread data structure.  */
  if (th->th_unique == NULL)
      psaddr_t addr;

      if (td_lookup (th->th_ta_p->ph, LINUXTHREADS_INITIAL_REPORT_EVENTS,
                   &addr) != PS_OK)
       /* Cannot read the symbol.  This should not happen.  */
       return TD_ERR;

      if (ps_pdwrite (th->th_ta_p->ph, addr, &onoff, sizeof (int)) != PS_OK)
       return TD_ERR;

      return TD_OK;

  if (ps_pdwrite (th->th_ta_p->ph,
                ((char *) th->th_unique
                 + offsetof (struct _pthread_descr_struct,
                &onoff, sizeof (int)) != PS_OK)
    return TD_ERR;   /* XXX Other error value?  */

  return TD_OK;

Here is the call graph for this function: