On Tue, 24 Nov 2009 17:34:22 +0200 Kostik Belousov wrote: > pthread_cleanup_push/pop are supposed to be used from the common > lexical scope. Citation from SUSv4: > > These functions may be implemented as macros. The application shall > ensure that they appear as statements, and in pairs within the same > lexical scope (that is, the pthread_cleanup_push() macro may be > thought to expand to a token list whose first token is '{' with > pthread_cleanup_pop() expanding to a token list whose last token is the > corresponding '}' ). > > Your change is wrong. > > Basically, the code should do > pthread_cleanup_push(some_func, arh); > something ... > pthread_cleanup_pop(1); > (1 denotes that some_func should be called).
I see. Thank you. So it really looks like a bug in our application as pthread_cleanup_pop(1) is missed. I will tell our developers :-) -- Mikolaj Golub _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"