12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #include <stddef.h>
- #include "thread_dbP.h"
- td_err_e
- td_thr_event_enable(const td_thrhandle_t *th, int onoff)
- {
- LOG ("td_thr_event_enable");
-
- if (th->th_unique == NULL)
- {
- psaddr_t addr;
- if (td_lookup (th->th_ta_p->ph, LINUXTHREADS_INITIAL_REPORT_EVENTS,
- &addr) != PS_OK)
-
- 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,
- p_report_events)),
- &onoff, sizeof (int)) != PS_OK)
- return TD_ERR;
- return TD_OK;
- }
|