summaryrefslogtreecommitdiffstats
path: root/share/man/man3/pthread_cleanup_push.3
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-11-02 23:22:22 +0000
committerjhb <jhb@FreeBSD.org>2014-11-02 23:22:22 +0000
commita245d679cfdca3ba5c5408a5b0f9f19e078eb998 (patch)
treefdaaa0db61ab2c9439c328d4b83e2fec28276f3c /share/man/man3/pthread_cleanup_push.3
parente57a7947db6e84c34b5e57652aebdae87841ece6 (diff)
downloadFreeBSD-src-a245d679cfdca3ba5c5408a5b0f9f19e078eb998.zip
FreeBSD-src-a245d679cfdca3ba5c5408a5b0f9f19e078eb998.tar.gz
MFC 273644,273738:
Clarify that pthread_cleanup_push()/pop() are implemented as macros that create a new code block and thus must be balanced at the same lexical scope. (This is also a requirement in POSIX.) PR: 194280 Submitted by: dr2867.business@pacbell.net
Diffstat (limited to 'share/man/man3/pthread_cleanup_push.3')
-rw-r--r--share/man/man3/pthread_cleanup_push.310
1 files changed, 9 insertions, 1 deletions
diff --git a/share/man/man3/pthread_cleanup_push.3 b/share/man/man3/pthread_cleanup_push.3
index 2790987..47f35db 100644
--- a/share/man/man3/pthread_cleanup_push.3
+++ b/share/man/man3/pthread_cleanup_push.3
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 30, 1998
+.Dd October 25, 2014
.Dt PTHREAD_CLEANUP_PUSH 3
.Os
.Sh NAME
@@ -52,6 +52,14 @@ When
is called, it is passed
.Fa arg
as its only argument.
+.Pp
+The
+.Fn pthread_cleanup_push
+function is implemented as a macro that opens a new block.
+Invocations of this function must appear as standalone statements that are
+paired with a later call of
+.Xr pthread_cleanup_pop 3
+in the same lexical scope.
.Sh RETURN VALUES
The
.Fn pthread_cleanup_push
OpenPOWER on IntegriCloud