Daniel Eischen wrote:

Hmm, agreed.  But note that Solaris 10 does it this way:

#define    pthread_cleanup_push(routine, args) { \
    _cleanup_t _cleanup_info; \
    __pthread_cleanup_push((_Voidfp)(routine), (void *)(args), \
                (caddr_t)_getfp(), &_cleanup_info);

#define    pthread_cleanup_pop(ex) \
    __pthread_cleanup_pop(ex, &_cleanup_info); \
}


Hmm, I considered using this style, but if there is a C++ object within the lexical scope, its destructor will execute after
pthread_cleanup_pop(), this may not be correct, so I used extra pair of
'{}'.

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"

Reply via email to