summaryrefslogtreecommitdiffstats
path: root/share/man/man3
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-10-25 19:31:34 +0000
committerjhb <jhb@FreeBSD.org>2014-10-25 19:31:34 +0000
commita3ed3e1c799e99308c27946dd0ec8d781eb4e822 (patch)
treee8ffd3e2dcda1457eaab98315c6b02c454ada5b6 /share/man/man3
parent0584337fe8ddb1beb1e8a06c8696fb4e8252aeeb (diff)
downloadFreeBSD-src-a3ed3e1c799e99308c27946dd0ec8d781eb4e822.zip
FreeBSD-src-a3ed3e1c799e99308c27946dd0ec8d781eb4e822.tar.gz
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 MFC after: 1 week
Diffstat (limited to 'share/man/man3')
-rw-r--r--share/man/man3/pthread_cleanup_pop.310
-rw-r--r--share/man/man3/pthread_cleanup_push.310
2 files changed, 18 insertions, 2 deletions
diff --git a/share/man/man3/pthread_cleanup_pop.3 b/share/man/man3/pthread_cleanup_pop.3
index 519e53f..580d197 100644
--- a/share/man/man3/pthread_cleanup_pop.3
+++ b/share/man/man3/pthread_cleanup_pop.3
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 30, 1998
+.Dd October 25, 2014
.Dt PTHREAD_CLEANUP_POP 3
.Os
.Sh NAME
@@ -50,6 +50,14 @@ If there is no cleanup routine
then
.Fn pthread_cleanup_pop
does nothing.
+.Pp
+The
+.Fn pthread_cleanup_push
+function is implemented as a macro that closes a block.
+Invocations of this function must appear as standalone statements that are
+paired with an earlier call of
+.Xr pthread_cleanup_push 3
+in the same lexical scope.
.Sh RETURN VALUES
The
.Fn pthread_cleanup_pop
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