pthread cleanup macros are broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
donny@pacemates
do { __pthread_
Just look at the very end of the output there and you can see how wrong that is. There's no reason the result of that macro should *end* with "do{"!!!
donny@pacemates
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Actually, the macro is written like this on purpose. pthread_ cleanup_ push starts a do while loop that is terminated by the pthread_cleanup_pop macro. In between the two macros, you can add your own code that will get executed in the body of the do-while. Check out http:// www.devdaily. com/unix/ man/man3/ pthread_ cleanup_ pop.3thr. shtml for more info.