linguini1 commented on code in PR #18344:
URL: https://github.com/apache/nuttx/pull/18344#discussion_r2759996437
##########
libs/libc/pthread/pthread_mutex_init.c:
##########
@@ -85,8 +85,8 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex,
# ifdef CONFIG_PTHREAD_MUTEX_BOTH
mutex->flags = attr && attr->robust == PTHREAD_MUTEX_ROBUST ?
_PTHREAD_MFLAGS_ROBUST : 0;
-# else
- mutex->flags = 0;
+# else /* CONFIG_PTHREAD_MUTEX_ROBUST */
Review Comment:
Just curious, is it possible to have both disabled?
I.e., should it be something like:
```c
#if defined(CONFIG_PTHREAD_MUTEX_BOTH)
/* ... */
#elif defined(CONFIG_PTHREAD_MUTEX_ROBUST)
/* Your change */
#else
mutex->flags = 0;
#endif
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]