The text 9960aa7eaae8, as FreeBSD 4.4-RELEASE shipped it.
add a cleanup function for thread exit
pthread_cleanup_push(3) on FreeBSD now