Is it safe to change or free the buffer passed to aio_write for writing in a file. Or should i wait for the operation to finish? Does the function copy all the buffer content to the queue or just the reference to the data?
Asked
Active
Viewed 61 times
1 Answers
2
From 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.
So you must not touch the structure until you have been informed that the operation has completed.

Kerrek SB
- 464,522
- 92
- 875
- 1,084