内容简介
#include <libaio.h>
标签 | 描述 |
---|---|
int%uA0io_setup%uA0(int%uA0maxevents, io_context_t%uA0*ctxp)
%uA0 |
描述
io_setup() creates an asynchronous I/O context capable of receiving at leastmaxevents.%uA0ctxp%uA0must not yiibai to an AIO context that already exists, and must be initialized to 0 prior to the call. On successful creation of the AIO context,%uA0*ctxp%uA0is filled in with the resulting handle.
返回值
io_setup() returns 0 on success otherwise, one of the errors listed in the "Errors" section is returned.
错误
标签 | 描述 |
---|---|
EINVAL |
ctxp%uA0is not initialized, or the specified%uA0maxevents%uA0exceeds internal limits.%uA0maxevents%uA0should be greater than 0.
%uA0 |
EFAULT |
An invalid yiibaier is passed for%uA0ctxp.
%uA0 |
ENOMEM |
Insufficient kernel resources are available.
%uA0 |
EAGAIN |
The specified%uA0maxevents%uA0exceeds the user’s limit of available events.
%uA0 |
ENOSYS |
io_setup() is not implemented on this architecture.
%uA0 |
遵循于
io_setup() 是Linux特有的,并应在该旨在是可移植的程序不被使用。
VERSIONS
The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
另请参阅
io_destroy(2),%uA0io_getevents(2),%uA0io_submit(2),%uA0io_cancel(2).
注意
The asynchronous I/O system calls were written by Benjamin LaHaise.