Loading...
--- Libc/Libc-320/pthreads/pthread_cleanup_push.3
+++ Libc/Libc-583/pthreads/pthread_cleanup_push.3
@@ -36,20 +36,27 @@
.Sh SYNOPSIS
.Fd #include <pthread.h>
.Ft void
-.Fn pthread_cleanup_push "void \*[lp]*cleanup_routine\*[rp]\*[lp]void *\*[rp]" "void *arg"
+.Fo pthread_cleanup_push
+.Fa "void \*[lp]*routine\*[rp]\*[lp]void *\*[rp]"
+.Fa "void *arg"
+.Fc
.Sh DESCRIPTION
The
.Fn pthread_cleanup_push
function adds
-.Fa cleanup_routine
+.Fa routine
to the top of the stack of cleanup handlers that
get called when the current thread exits.
.Pp
When
-.Fa cleanup_routine
+.Fa routine
is called, it is passed
.Fa arg
as its only argument.
+.Fn pthread_cleanup_push
+must be paired with a corresponding
+.Xr pthread_cleanup_pop 3
+in the same lexical scope.
.Sh RETURN VALUES
.Fn pthread_cleanup_push
does not return any value.