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


The following commit(s) were added to refs/heads/master by this push:
     new 192ac6d3fbc sched: Correct the stale pthread_entry_s comment.
192ac6d3fbc is described below

commit 192ac6d3fbc06192c3683e0409b11aee41266cf7
Author: rongbaichuan <[email protected]>
AuthorDate: Thu Oct 29 15:48:14 2026 +0800

    sched: Correct the stale pthread_entry_s comment.
    
    include/nuttx/sched.h still carried a comment header naming
    struct pthread_tcb_s, plus a paragraph about separate TCB forms for
    tasks and pthreads.  Neither structure exists: pthreads use the
    common struct tcb_s and keep their startup arguments in a
    struct pthread_entry_s appended after it.
    
    Assisted-by: DeepSeek Harness:deepseek-flash
    Signed-off-by: rongbaichuan <[email protected]>
---
 include/nuttx/sched.h | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 6293d6c2976..2a2f5adbc85 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -766,15 +766,9 @@ struct tcb_s
 #endif
 };
 
-/* struct pthread_tcb_s *****************************************************/
-
-/* This is the particular form of the task control block (TCB) structure used
- * by pthreads. There are two TCB forms:  one for pthreads and one for tasks.
- * Both share the common TCB fields (which must appear at the top of the
- * structure) plus additional fields unique to tasks and threads.
- * Having separate structures for tasks and pthreads adds some complexity,
- * but saves memory in that it prevents pthreads from being burdened with
- * the overhead required for tasks (and vice versa).
+/* pthread startup parameters.  This structure is appended to the TCB and
+ * fetched with (FAR struct pthread_entry_s *)(tcb + 1).  Pthreads thus
+ * share the common struct tcb_s and need no TCB type of their own.
  */
 
 #ifndef CONFIG_DISABLE_PTHREAD

Reply via email to