logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pthread_testcancel - request delivery of any pending cancelation request

Attributes

       For an explanation of the terms used in this section, see attributes(7).
       ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐
       │ InterfaceAttributeValue   │
       ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤
       │ pthread_testcancel()                                                        │ Thread safety │ MT-Safe │
       └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

Description

       Calling pthread_testcancel() creates a cancelation point within the calling thread, so that a thread that
       is otherwise executing code that contains no cancelation points will respond to a cancelation request.

       If  cancelability  is  disabled  (using pthread_setcancelstate(3)), or no cancelation request is pending,
       then a call to pthread_testcancel() has no effect.

Errors

       This function always succeeds.

Examples

       See pthread_cleanup_push(3).

History

       glibc 2.0.  POSIX.1-2001.

Library

       POSIX threads library (libpthread, -lpthread)

Name

       pthread_testcancel - request delivery of any pending cancelation request

Return Value

       This function does not return a value.  If the calling thread is canceled as a consequence of a  call  to
       this function, then the function does not return.

See Also

pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3), pthreads(7)

Linux man-pages 6.9.1                              2024-05-02                              pthread_testcancel(3)

Standards

       POSIX.1-2008.

Synopsis

#include<pthread.h>voidpthread_testcancel(void);

See Also