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