socket: implement accept() with syscalls_sys_accept4#469
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the accept function to be an inline wrapper around accept4 with a flags value of 0. Feedback suggests that implementing accept as an inline function in the header is inconsistent with other socket wrappers in the library and may introduce portability issues. It is recommended to move the implementation to the source file as a regular function.
Unit Test Results10 543 tests 9 881 ✅ 55m 53s ⏱️ Results for commit b590d94. ♻️ This comment has been updated with latest results. |
TASK: RTOS-1289
This will allow to deprecate/remove `accept` syscall. TASK: RTOS-1289
86f6550 to
b590d94
Compare
julianuziemblo
left a comment
There was a problem hiding this comment.
while at it, we could potentially just remove syscalls_sys_accept, as we're still before release. @Darchiv what do you think?
|
|
||
| inline ssize_t recv(int socket, void *message, size_t length, int flags) | ||
| { | ||
| return recvfrom(socket, message, length, flags, NULL, 0); |
There was a problem hiding this comment.
nit from previous implementation: last argument is a pointer, so NULL could be more readable
This will allow to deprecate/remove
acceptsyscall.TASK: RTOS-1289
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment