Nsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget9/translations/zh_CN/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/zh_TW/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/it_IT/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/ja_JP/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/ko_KR/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/sp_SP/userspace-api/media/cec/cec-func-pollmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhS/var/lib/git/docbuild/linux/Documentation/userspace-api/media/cec/cec-func-poll.rsthKubhtarget)}(h.. _cec-func-poll:h]h}(h]h ]h"]h$]h&]refid cec-func-polluh1hhKhhhhhhubhsection)}(hhh](htitle)}(h cec poll()h]h cec poll()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h3cec-poll - Wait for some event on a file descriptorh]h3cec-poll - Wait for some event on a file descriptor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh literal_block)}(h#include h]h#include }hjsbah}(h]h ]h"]h$]h&]hhforcelanguagechighlight_args}uh1jhhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleCEC.poll (C function) c.CEC.pollhNtauh1j&hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h?int poll( struct pollfd *ufds, unsigned int nfds, int timeout )h]hdesc_signature_line)}(h=int poll(struct pollfd *ufds, unsigned int nfds, int timeout)h](hdesc_sig_keyword_type)}(hinth]hint}(hjJhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jHhjDhhhhhKubhdesc_sig_space)}(h h]h }(hj[hhhNhNubah}(h]h ]wah"]h$]h&]uh1jYhjDhhhhhKubh desc_name)}(hpollh]h desc_sig_name)}(hpollh]hpoll}(hjrhhhNhNubah}(h]h ]nah"]h$]h&]uh1jphjlubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jjhjDhhhhhKubhdesc_parameterlist)}(h5(struct pollfd *ufds, unsigned int nfds, int timeout)h](hdesc_parameter)}(hstruct pollfd *ufdsh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubh)}(hhh]jq)}(hpollfdh]hpollfd}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubah}(h]h ]h"]h$]h&] refdomainj#reftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data](j ASTIdentifier)}jCECsbNj)}jjtsb c.CEC.pollesbuh1hhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubjq)}(hufdsh]hufds}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int nfdsh](jI)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jHhjubjZ)}(h h]h }(hj)hhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjI)}(hinth]hint}(hj7hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jHhjubjZ)}(h h]h }(hjEhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjq)}(hnfdsh]hnfds}(hjShhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h int timeouth](jI)}(hinth]hint}(hjlhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jHhjhubjZ)}(h h]h }(hjzhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjhubjq)}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjDhhhhhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jBsphinx_line_type declaratorhj>hhhhhKubah}(h]j5ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j<hhhKhj9hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj9hhhhhKubeh}(h]h ](j#functioneh"]h$]h&]domainj#objtypejdesctypejnoindex noindexentrynocontentsentryuh1j7hhhjhNhNubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h)``ufds`` List of FD events to be watched h](hterm)}(h``ufds``h]hliteral)}(hjh]hufds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hList of FD events to be watchedh]hList of FD events to be watched}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h1``nfds`` Number of FD events at the \*ufds array h](j)}(h``nfds``h]j)}(hj3h]hnfds}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jhhhKhj-ubj)}(hhh]h)}(h'Number of FD events at the \*ufds arrayh]h'Number of FD events at the *ufds array}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h'``timeout`` Timeout to wait for events h](j)}(h ``timeout``h]j)}(hjkh]htimeout}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jhhhK"hjeubj)}(hhh]h)}(hTimeout to wait for eventsh]hTimeout to wait for events}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhhhK"hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK%ubh)}(hHWith the :c:func:`poll()` function applications can wait for CEC events.h](h With the }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](xrefj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc%userspace-api/media/cec/cec-func-poll refdomainj#reftypefunc refexplicitrefwarnjj)}j]jNasb reftargetpolluh1hhhhK'hjubh/ function applications can wait for CEC events.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubh)}(hXyOn success :c:func:`poll()` returns the number of file descriptors that have been selected (that is, file descriptors for which the ``revents`` field of the respective struct :c:type:`pollfd` is non-zero). CEC devices set the ``POLLIN`` and ``POLLRDNORM`` flags in the ``revents`` field if there are messages in the receive queue. If the transmit queue has room for new messages, the ``POLLOUT`` and ``POLLWRNORM`` flags are set. If there are events in the event queue, then the ``POLLPRI`` flag is set. When the function times out it returns a value of zero, on failure it returns -1 and the ``errno`` variable is set appropriately.h](h On success }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjjpolluh1hhhhK*hjubhi returns the number of file descriptors that have been selected (that is, file descriptors for which the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field of the respective struct }(hjhhhNhNubh)}(h:c:type:`pollfd`h]j)}(hj3h]hpollfd}(hj5hhhNhNubah}(h]h ](jj#c-typeeh"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypetype refexplicitrefwarnjjjpollfduh1hhhhK*hjubh# is non-zero). CEC devices set the }(hjhhhNhNubj)}(h ``POLLIN``h]hPOLLIN}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``POLLRDNORM``h]h POLLRDNORM}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flags in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhh field if there are messages in the receive queue. If the transmit queue has room for new messages, the }(hjhhhNhNubj)}(h ``POLLOUT``h]hPOLLOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``POLLWRNORM``h]h POLLWRNORM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhA flags are set. If there are events in the event queue, then the }(hjhhhNhNubj)}(h ``POLLPRI``h]hPOLLPRI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg flag is set. When the function times out it returns a value of zero, on failure it returns -1 and the }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh variable is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjhhubh)}(h6For more details see the :c:func:`poll()` manual page.h](hFor more details see the }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjjpolluh1hhhhK5hjubh manual page.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hOn success, :c:func:`poll()` returns the number structures which have non-zero ``revents`` fields, or zero if the call timed out. On error -1 is returned, and the ``errno`` variable is set appropriately:h](h On success, }(hj"hhhNhNubh)}(h:c:func:`poll()`h]j)}(hj,h]hpoll()}(hj.hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjjpolluh1hhhhK:hj"ubh3 returns the number structures which have non-zero }(hj"hhhNhNubj)}(h ``revents``h]hrevents}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhI fields, or zero if the call timed out. On error -1 is returned, and the }(hj"hhhNhNubj)}(h ``errno``h]herrno}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh variable is set appropriately:}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubj)}(hhh](j)}(hR``EBADF`` One or more of the ``ufds`` members specify an invalid file descriptor. h](j)}(h ``EBADF``h]j)}(hjh]hEBADF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1jhhhK@hjzubj)}(hhh]h)}(hGOne or more of the ``ufds`` members specify an invalid file descriptor.h](hOne or more of the }(hjhhhNhNubj)}(h``ufds``h]hufds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, members specify an invalid file descriptor.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhhhK@hjwubj)}(h<``EFAULT`` ``ufds`` references an inaccessible memory area. h](j)}(h ``EFAULT``h]j)}(hjh]hEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKChjubj)}(hhh]h)}(h0``ufds`` references an inaccessible memory area.h](j)}(h``ufds``h]hufds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh( references an inaccessible memory area.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKChjwhhubj)}(h0``EINTR`` The call was interrupted by a signal. h](j)}(h ``EINTR``h]j)}(hjh]hEINTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKFhj ubj)}(hhh]h)}(h%The call was interrupted by a signal.h]h%The call was interrupted by a signal.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhj%ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKFhjwhhubj)}(hl``EINVAL`` The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.h](j)}(h ``EINVAL``h]j)}(hjHh]hEINVAL}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jhhhKIhjBubj)}(hhh]h)}(haThe ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.h](hThe }(hj`hhhNhNubj)}(h``nfds``h]hnfds}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh value exceeds the }(hj`hhhNhNubj)}(h``RLIMIT_NOFILE``h]h RLIMIT_NOFILE}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh value. Use }(hj`hhhNhNubj)}(h``getrlimit()``h]h getrlimit()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh to obtain this value.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKIhj]ubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhhhKIhjwhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhK8ubeh}(h](cec-pollheh ]h"]( cec poll() cec-func-polleh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jhjjhhjjjjjj jju nametypes}(jjhjjjjuh}(hhjhhhjjj5j>jjj jjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h3Hyperlink target "cec-func-poll" is not referenced.}hjXsbah}(h]h ]h"]h$]h&]uh1hhjUubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jSuba transformerN include_log] decorationNhhub.