From 07451ab1b9ac25da6e996b239fc2aa07f00b3ac9 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 14 Nov 2010 06:55:39 +0100 Subject: [PATCH] pthreads.7: Added description of async-cancel-safe functions Signed-off-by: Michael Kerrisk --- man7/pthreads.7 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/man7/pthreads.7 b/man7/pthreads.7 index 9faf84db1..162f5278a 100644 --- a/man7/pthreads.7 +++ b/man7/pthreads.7 @@ -21,7 +21,7 @@ .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" -.TH PTHREADS 7 2008-11-18 "Linux" "Linux Programmer's Manual" +.TH PTHREADS 7 2010-11-14 "Linux" "Linux Programmer's Manual" .SH NAME pthreads \- POSIX threads .SH DESCRIPTION @@ -231,6 +231,21 @@ wcstombs() wctomb() .fi .in +.SS Async-cancel-safe functions +An async-cancel-safe function is one that can be safely called +in an application where asynchronous cancelability is enabled (see +.BR pthread_setcancelstate (3)). + +Only the following functions are required to be async-cancel-safe by +POSIX.1-2001 and POSIX.1-2008: +.in +4n +.nf + +pthread_cancel() +pthread_setcancelstate() +pthread_setcanceltype() +.fi +.in .SS Cancellation Points POSIX.1 specifies that certain functions must, and certain other functions may, be cancellation points.