{"id":7410,"date":"2022-12-20T19:37:59","date_gmt":"2022-12-20T22:37:59","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/aio_suspend-man3\/"},"modified":"2022-12-20T19:37:59","modified_gmt":"2022-12-20T22:37:59","slug":"aio_suspend-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/aio_suspend-man3\/","title":{"rendered":"AIO_SUSPEND (man3)"},"content":{"rendered":"<h1 align=\"center\">AIO_SUSPEND<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#RETURN VALUE\">RETURN VALUE<\/a><br \/> <a href=\"#ERRORS\">ERRORS<\/a><br \/> <a href=\"#VERSIONS\">VERSIONS<\/a><br \/> <a href=\"#ATTRIBUTES\">ATTRIBUTES<\/a><br \/> <a href=\"#CONFORMING TO\">CONFORMING TO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">aio_suspend \u2212 wait for asynchronous I\/O operation or timeout<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <aio.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>int aio_suspend(const struct aiocb bodies manpages.csv script_extrae_body.sh script.sh usr const<\/b> <i>aiocb_list<\/i><b>[], <br \/> int<\/b> <i>nitems<\/i><b>, const struct timespec *<\/b><i>timeout<\/i><b>);<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Link with <i>\u2212lrt<\/i>.<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>aio_suspend<\/b>() function suspends the calling thread until one of the following occurs:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>One or more of the asynchronous I\/O requests in the list <i>aiocb_list<\/i> has completed.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p>A signal is delivered.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>*<\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"85%\">\n<p><i>timeout<\/i> is not NULL and the specified time interval has passed. (For details of the <i>timespec<\/i> structure, see <b>nanosleep<\/b>(2).)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>nitems<\/i> argument specifies the number of items in <i>aiocb_list<\/i>. Each item in the list pointed to by <i>aiocb_list<\/i> must be either NULL (and then is ignored), or a pointer to a control block on which I\/O was initiated using <b>aio_read<\/b>(3), <b>aio_write<\/b>(3), or <b>lio_listio<\/b>(3). (See <b>aio<\/b>(7) for a description of the <i>aiocb<\/i> structure.)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <b>CLOCK_MONOTONIC<\/b> is supported, this clock is used to measure the timeout interval (see <b>clock_gettime<\/b>(3)).<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If this function returns after completion of one of the I\/O requests specified in <i>aiocb_list<\/i>, 0 is returned. Otherwise, \u22121 is returned, and <i>errno<\/i> is set to indicate the error.<\/p>\n<h2>ERRORS <a name=\"ERRORS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><b>EAGAIN<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">The call timed out before any of the indicated operations had completed.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>EINTR<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>The call was ended by signal (possibly the completion signal of one of the operations we were waiting for); see <b>signal<\/b>(7).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>ENOSYS<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p><b>aio_suspend<\/b>() is not implemented.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>VERSIONS <a name=\"VERSIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>aio_suspend<\/b>() function is available since glibc 2.1.<\/p>\n<h2>ATTRIBUTES <a name=\"ATTRIBUTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">For an explanation of the terms used in this section, see <b>attributes<\/b>(7).<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-1568031.png\" alt=\"Image grohtml-1568031.png\"><\/p>\n<h2>CONFORMING TO <a name=\"CONFORMING TO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">POSIX.1-2001, POSIX.1-2008.<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">One can achieve polling by using a non-NULL <i>timeout<\/i> that specifies a zero time interval.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If one or more of the asynchronous I\/O operations specified in <i>aiocb_list<\/i> has already completed at the time of the call to <b>aio_suspend<\/b>(), then the call returns immediately.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To determine which I\/O operations have completed after a successful return from <b>aio_suspend<\/b>(), use <b>aio_error<\/b>(3) to scan the list of <i>aiocb<\/i> structures pointed to by <i>aiocb_list<\/i>.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The glibc implementation of <b>aio_suspend<\/b>() is not async-signal-safe, in violation of the requirements of POSIX.1.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>aio_cancel<\/b>(3), <b>aio_error<\/b>(3), <b>aio_fsync<\/b>(3), <b>aio_read<\/b>(3), <b>aio_return<\/b>(3), <b>aio_write<\/b>(3), <b>lio_listio<\/b>(3), <b>aio<\/b>(7), <b>time<\/b>(7)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  aio_suspend \u2212 wait for asynchronous I\/O operation or timeout <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,2010,3007],"class_list":["post-7410","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-aio_suspend","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7410"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7410\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}