gpt4 book ai didi

aio_write 到文件请求后更改数据

转载 作者:行者123 更新时间:2023-11-30 19:18:37 25 4
gpt4 key购买 nike

更改或释放传递给 aio_write 以便写入文件的缓冲区是否安全。或者我应该等待操作完成?该函数是将所有缓冲区内容复制到队列还是仅复制对数据的引用?

最佳答案

来自man 7 aio:

he control block buffer and the buffer pointed to by aio_buf must not be changed while the I/O operation is in progress. These buffers must remain valid until the I/O operation completes.

因此,在您被告知操作已完成之前,请勿触摸该结构。

关于aio_write 到文件请求后更改数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26567654/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com