This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a870ede1d1fea3477fd058e239cfab65ef8cd2e0 Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 20 21:02:48 2026 +0200 Documentation/reference/user: Describe the pthread option limits. Say what pthread_cleanup_push() does with CONFIG_TLS_NCLEANUP=0 and how cancellation works without CONFIG_CANCELLATION_POINTS. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/reference/user/08_pthread.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/reference/user/08_pthread.rst b/Documentation/reference/user/08_pthread.rst index ae985d83a80..b7c3d257362 100644 --- a/Documentation/reference/user/08_pthread.rst +++ b/Documentation/reference/user/08_pthread.rst @@ -520,6 +520,11 @@ No support for the following pthread interfaces is provided by NuttX: The cancellability state and type of any newly created threads are ``PTHREAD_CANCEL_ENABLE`` and ``PTHREAD_CANCEL_DEFERRED respectively``. + Deferred cancellation needs ``CONFIG_CANCELLATION_POINTS``. Without it, + ``pthread_cancel()`` acts at once, the type is always + ``PTHREAD_CANCEL_ASYNCHRONOUS`` (``oldtype`` reports it), and + ``PTHREAD_CANCEL_DEFERRED`` fails with ``EINVAL``. + **Input Parameters:** :param type: New cancellation state. One of ``PTHREAD_CANCEL_DEFERRED`` @@ -581,6 +586,10 @@ No support for the following pthread interfaces is provided by NuttX: - The thread calls ``pthread_cleanup_pop()`` with a non-zero execute argument. + The stack has ``CONFIG_TLS_NCLEANUP`` entries. With + ``CONFIG_TLS_NCLEANUP=0`` the function does not exist and a program that + calls it does not link. + **Input Parameters:** - ``routine``. The cleanup routine to be pushed on the cleanup stack.
