⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aio_write.3

📁 xen 3.2.2 源码
💻 3
字号:
.TH aio_write 3 2002-09-12 "Linux 2.4" Linux AIO".SH NAMEaio_write  \-  Initiate an asynchronous write operation.SH SYNOPSYS.nf.B #include <errno.h>.sp.br .B #include <aio.h>.sp.br.BI "int aio_write (struct aiocb * aiocbp);".fi.SH DESCRIPTIONThis function initiates an asynchronous write operation.  The functioncall immediately returns after the operation was enqueued or if beforethis happens an error was encountered.The first .IR "aiocbp->aio_nbytes"bytes from the buffer starting at.IR "aiocbp->aio_buf"are written to the file for which.IR "aiocbp->aio_fildes"is an descriptor, starting at the absoluteposition .IR "aiocbp->aio_offset"in the file.If prioritized I/O is supported by the platform, the.IR "aiocbp->aio_reqprio "value is used to adjust the priority beforethe request is actually enqueued.The calling process is notified about the termination of the readrequest according to the .IR "aiocbp->aio_sigevent"value.When .IR "aio_write"returns, the return value is zero if no erroroccurred that can be found before the process is enqueued.  If such anearly error is found the function returns .IR -1and sets.IR "errno"to one of the following values..TP.B EAGAINThe request was not enqueued due to (temporarily) exceeded resourcelimitations..TP.B ENOSYSThe .IR "aio_write"function is not implemented..TP.B EBADFThe .IR "aiocbp->aio_fildes"descriptor is not valid.  This conditionmay not be recognized before enqueueing the request, and so this errormight also be signaled asynchronously..TP.B EINVALThe .IR "aiocbp->aio_offset"or.IR "aiocbp->aio_reqprio"value isinvalid.  This condition may not be recognized before enqueueing therequest and so this error might also be signaled asynchronously..PPIn the case .IR "aio_write"returns zero, the current status of therequest can be queried using .IR "aio_error"and .IR "aio_return"functions.  As long as the value returned by .IR "aio_error"is.IR "EINPROGRESS"the operation has not yet completed.  If.IR "aio_error"returns zero, the operation successfully terminated,otherwise the value is to be interpreted as an error code.  If thefunction terminated, the result of the operation can be get using a callto .IR "aio_return".  The returned value is the same as an equivalentcall to .IR "read"would have returned.  Possible error codes returnedby .IR "aio_error"are:.TP.B EBADFThe .IR "aiocbp->aio_fildes"descriptor is not valid..TP.B ECANCELEDThe operation was canceled before the operation was finished..TP.B EINVALThe .IR "aiocbp->aio_offset"value is invalid..PPWhen the sources are compiled with .IR "_FILE_OFFSET_BITS == 64", thisfunction is in fact .IR "aio_write64"since the LFS interface transparentlyreplaces the normal implementation..SH "RETURN VALUES"When .IR "aio_write"returns, the return value is zero if no erroroccurred that can be found before the process is enqueued.  If such anearly error is found the function returns .IR -1and sets.IR "errno"to one of the following values..SH ERRORS.TP.B EAGAINThe request was not enqueued due to (temporarily) exceeded resourcelimitations..TP.B ENOSYSThe .IR "aio_write"function is not implemented..TP.B EBADFThe .IR "aiocbp->aio_fildes"descriptor is not valid.  This conditionmay not be recognized before enqueueing the request, and so this errormight also be signaled asynchronously..TP.B EINVALThe .IR "aiocbp->aio_offset"or.IR "aiocbp->aio_reqprio"value isinvalid.  This condition may not be recognized before enqueueing therequest and so this error might also be signaled asynchronously..SH "SEE ALSO".BR aio(3),.BR aio_cancel(3),.BR aio_cancel64(3),.BR aio_error(3),.BR aio_error64(3),.BR aio_fsync(3),.BR aio_fsync64(3),.BR aio_init(3),.BR aio_read(3),.BR aio_read64(3),.BR aio_return(3),.BR aio_return64(3),.BR aio_suspend(3),.BR aio_suspend64(3),.BR aio_write64(3),.BR errno(3),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -