|
From: Nicholas N. <nj...@ca...> - 2003-12-01 14:24:02
|
On Mon, 1 Dec 2003, Tom Hughes wrote:
> > +PRE(gettid)
> > +{
> > + /* pid_t gettid(void); */
> > + MAYBE_PRINTF("gettid ()\n");
> > +}
>
> That may stop valgrind complaining, but it doesn't really do what
> anybody expects as it will return the same value in all threads. In
> particular a signal sent to the returned value will not go to the
> right thread.
>
> The way I've done it in my NPTL patch, which is just about complete
> now, is to mark it as a blocking system call so that it is executed
> in the proxy LWP which means that it will get a unique ID for each
> thread, and that signals sent to that ID will get routed to the right
> thread in valgrind.
>
> Jeremy wasn't entirely sure that my solution was a good idea, or even
> that it was worth trying to implement it at all at the moment. He had
> some concerns about people managing to kill a proxy LWP with nasty
> consequences.
Ah. Should I back out the changes? In HEAD and stable branch?
N
|