jingfei195887 commented on code in PR #20668:
URL: https://github.com/apache/nuttx/pull/20668#discussion_r4641545479
##########
include/spawn.h:
##########
@@ -221,6 +221,113 @@ int posix_spawnattr_setstackaddr(FAR posix_spawnattr_t
*attr,
# define posix_spawnattr_setstackaddr(attr, addr) (0)
#endif
+/* The single-field accessors are also macros, so that callers including
+ * this header access the field directly. The functions above stay in libc
+ * for callers that do not include it or take their address.
+ */
+
+static inline int __posix_spawnattr_destroy(FAR posix_spawnattr_t *attr)
+{
+ (void)attr;
+ return 0;
+}
+
+static inline
Review Comment:
Done in 615790ae9eb, following the spinlock helpers: the eleven accessors
are defined once in `spawn.h`, marked `POSIX_SPAWN_INLINE` (`static
inline_function` by default), and the new `libs/libc/spawn/lib_psa_inline.c`
defines `POSIX_SPAWN_INLINE` empty before including `spawn.h` to emit the libc
versions. The eleven separate source files are removed, so nothing is
duplicated.
`nm libc.a` still lists all eleven as `T`, and `stm32f103-minimum:nsh` is 56
bytes smaller than master debb89e1aa9.
--
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]