]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: Document AS-safe functions in cancellation.c.
authorCarlos O'Donell <carlos@redhat.com>
Fri, 4 Oct 2019 19:58:08 +0000 (15:58 -0400)
committerCarlos O'Donell <carlos@redhat.com>
Fri, 18 Oct 2019 19:55:33 +0000 (15:55 -0400)
Document in comments that __pthread_enable_asynccancel and
__pthread_disable_asynccancel must be AS-safe in general with
the exception of the act of cancellation.

nptl/cancellation.c

index 771284556145a5dda868bc564ad092e6e654ce1a..23d7b2b34c16011a460518bc36ac10d0ed9224b3 100644 (file)
@@ -24,7 +24,9 @@
 
 /* The next two functions are similar to pthread_setcanceltype() but
    more specialized for the use in the cancelable functions like write().
-   They do not need to check parameters etc.  */
+   They do not need to check parameters etc.  These functions must be
+   AS-safe, with the exception of the actual cancellation, because they
+   are called by wrappers around AS-safe functions like write().*/
 int
 attribute_hidden
 __pthread_enable_asynccancel (void)
@@ -59,7 +61,8 @@ __pthread_enable_asynccancel (void)
   return oldval;
 }
 
-
+/* See the comment for __pthread_enable_asynccancel regarding
+   the AS-safety of this function.  */
 void
 attribute_hidden
 __pthread_disable_asynccancel (int oldtype)