Unix-system-calls-io-setup

提供:Dev Guides
移動先:案内検索

[top]#

[[File:]]

[[File:]]

|Web |This Site

  • 初心者向けのUnix *
  • 高度なUnix *

選択した読書

Copyright©2014 by finddevguides

  Home     References     Discussion Forums     About TP  

io_setup()-Unix、Linuxシステムコール

[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]

広告

NAME

io_setup-非同期I/Oコンテキストを作成する

概要

  1. include <libaio.h>

Tag

説明

int* io_setup *(int maxevents、io_context_t _ * ctxp_);

説明

*io_setup* ()は、少なくとも_maxevents_を受信できる非同期I/Oコンテキストを作成します。 _ctxp_は、すでに存在するAIOコンテキストを指してはならず、呼び出しの前に0に初期化する必要があります。 AIOコンテキストが正常に作成されると、_ * ctxp_に結果のハンドルが入力されます。

返り値

*io_setup* ()は成功すると0を返します。それ以外の場合、「エラー」セクションにリストされているエラーの1つが返されます。

エラー

Tag Description
EINVAL ctxp is not initialized, or the specified maxevents exceeds internal limits. maxevents should be greater than 0.
EFAULT An invalid pointer is passed for ctxp.
ENOMEM Insufficient kernel resources are available.
EAGAIN The specified maxevents exceeds the user’s limit of available events.
ENOSYS io_setup() is not implemented on this architecture.

準拠

*io_setup* ()はLinux固有であり、移植性を目的としたプログラムでは使用しないでください。

バージョン

非同期I/Oシステムコールは、2002年8月にLinux 2.5で初めて登場しました。

関連項目

*io_destroy* (2)、 *io_getevents* (2)、 *io_submit* (2)、 *io_cancel* (2)。

ノート

非同期I/OシステムコールはBenjamin LaHaiseによって作成されました。

著者

ケント・ヨーダー。 [[File:]] image :http://www.finddevguides.com/images/next.gif [next] [[File:]]

広告

  
Advertisements