mirror of
https://github.com/apache/nuttx.git
synced 2026-09-30 19:06:22 +00:00
Per POSIX, aio_read() and aio_write() must return -1 and set errno to EINVAL when the request cannot be queued (aio_reqprio < 0, aio_offset < 0), and the error must also be retrievable via aio_error(). Conversely, when queuing fails with a bad file descriptor, the error belongs to the asynchronous operation: the functions must return 0 and report EBADF through aio_error(). - Merge the offset/reqprio checks and return ERROR with errno set, after storing the result in aio_result for aio_error(). - Drop the aio_fildes < 0 early return: a closed descriptor is now caught by fcntl()/aio_queue() and reported through aio_result with the function returning OK. - aio_error(): report -EINVAL (failed validation) through errno instead of returning it as an error value. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com> |
||
|---|---|---|
| .. | ||
| libbuiltin | ||
| libc | ||
| libdsp | ||
| libm | ||
| libnx | ||
| libxx | ||
| CMakeLists.txt | ||