Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The UNIX AIO interface will for aio_read:

https://www.man7.org/linux/man-pages/man7/aio.7.html

That said, it would be insane to pass it pointers to the stack, as the only safe way to make that work would be to do `aio_suspend()` or busy wait and you might as well just use a synchronous read() function in that case.



> as the only safe way to make that work would be to do `aio_suspend()` or busy wait and you might as well just use a synchronous read() function in that case.

Wait but read() wouldn't allow overlapping operations. Whereas if you suspend or busy wait you can do that for multiple operations executing concurrently.

Also if the buffer is from a caller frame then you could also return safely no?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: