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


##########
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:
   > of newlib functions which depend on the OS support. One example I can 
think of is the HMAC support, which motivated this PR some time ago: #7661
   
   Ok. Just let me understand the use case. Till now I thought that libc stubs 
are called from ESP-IDF layer that runs in kernel, but if the stubs are needed 
for application usage only, then I will revert changes for libc stubs so they 
will be mapped to application layer APIs that will lead to a system calls in 
case of non-flat build mode.
   
   I mean that `close` is a system call while `nx_close` is not, so that is 
important case if stubs are called by application layer.



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