anchao commented on code in PR #12601:
URL: https://github.com/apache/nuttx/pull/12601#discussion_r1685849559
##########
libs/libc/queue/CMakeLists.txt:
##########
@@ -18,15 +18,6 @@
#
#
##############################################################################
-target_sources(
- c
- PRIVATE sq_addafter.c
- sq_remlast.c
- sq_remfirst.c
- sq_remafter.c
- sq_count.c
- dq_addafter.c
- dq_remlast.c
- dq_remfirst.c
- dq_remafter.c
- dq_count.c)
+if(NOT CONFIG_LIBC_INLINE_QUEUE)
Review Comment:
remove the check
##########
libs/libc/queue/queue.c:
##########
@@ -19,36 +19,18 @@
****************************************************************************/
/****************************************************************************
- * Included Files
+ * Pre-processor Definitions
Review Comment:
```
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifndef CONFIG_LIBC_INLINE_QUEUE
# define CONFIG_LIBC_INLINE_QUEUE
# define STATIC_INLINE
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/queue.h>
/****************************************************************************
* Public Functions
****************************************************************************/
#endif
```
##########
libs/libc/queue/Make.defs:
##########
@@ -18,12 +18,15 @@
#
############################################################################
+ifneq ($(CONFIG_LIBC_INLINE_QUEUE),y)
Review Comment:
ditto
##########
include/nuttx/queue.h:
##########
@@ -31,6 +31,14 @@
* Pre-processor Definitions
****************************************************************************/
+#ifdef CONFIG_LIBC_INLINE_QUEUE
+# ifndef STATIC_INLINE
+#define STATIC_INLINE static inline_function
Review Comment:
```suggestion
# define STATIC_INLINE static inline_function
```
--
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]