patacongo commented on a change in pull request #1187: URL: https://github.com/apache/incubator-nuttx/pull/1187#discussion_r438960780
########## File path: include/nuttx/sched.h ########## @@ -714,6 +714,23 @@ struct tcb_s FAR struct mqueue_inode_s *msgwaitq; /* Waiting for this message queue */ #endif + /* Robust mutex support *******************************************************/ + +#if !defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE) + FAR struct pthread_mutex_s *mhead; /* List of mutexes held by thread */ +#endif + + /* Clean-up stack *************************************************************/ + +#ifdef CONFIG_PTHREAD_CLEANUP + /* tos - The index to the next available entry at the top of the stack. + * stack - The pre-allocated clean-up stack memory. + */ + + uint8_t tos; + struct pthread_cleanup_s stack[CONFIG_PTHREAD_CLEANUP_STACKSIZE]; +#endif + Review comment: Wouldn't it be better to move these into TLS? They should only be used by user space applications and, hence, should be accessed in the same way that the errno variable is. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org