123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #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;
- }
|