tmedicci commented on code in PR #10110:
URL: https://github.com/apache/nuttx/pull/10110#discussion_r1286914801


##########
arch/risc-v/src/esp32c3/esp32c3_libc_stubs.c:
##########
@@ -59,12 +60,12 @@ struct _reent;
 
 int _close_r(struct _reent *r, int fd)
 {
-  return close(fd);
+  return nx_close(fd);

Review Comment:
   Hi! 
   
   > Is kernel linked with Internal ROM APIs that newlib functions?
   
   Yes, there are internal ROM functions that require newlib functions to be 
defined, including crypto functions. Most of them run on the kernel side (e.g. 
Wireless), so theoretically, it should have no problem using kernel functions 
on the defining the stubs.
    
   > Are apps linked with Internal ROM APIs that newlib functions?
   
   I can't recall an app that uses them directly, but it'd be safer if we 
consider that. `hmac_md5` is an example: no app uses it directly, but we can't 
say for sure that clients don't.
   
   I'd say that is safer to use `_NX_CLOSE`, `lib_malloc`, `lib_free` etc for 
now.
   
   



-- 
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]

Reply via email to