On Fri, 2008-06-20 at 10:41 -0400, James Carlson wrote: > Why was making 'wq' static at ctfmerge.c:728 necessary? Shouldn't the > joins do all of the work needed? (Are you concerned about a canceled > pthread_join?)
No, it's a belt & suspenders thing intended to make ctfmerge less fragile in the long run. ctfmerge does two things which, in isolation, are inherently fragile but not inherently wrong by themselves. But they combine to cause a hard-to-root-cause bug. Changing it to not do either one of them would be sufficient. meem pointed out that this code may well be copied by someone as an example of how to do multi-threaded programming, and as such, neither practice (falling off the end of main without reaping your threads, or passing a pointer into your stack to another thread) is really something which we'd like to see copied. - Bill _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org