ysphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget5/translations/zh_CN/userspace-api/media/v4l/func-pollmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/zh_TW/userspace-api/media/v4l/func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/it_IT/userspace-api/media/v4l/func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/ja_JP/userspace-api/media/v4l/func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/ko_KR/userspace-api/media/v4l/func-pollmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/sp_SP/userspace-api/media/v4l/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:spacepreserveuh1hhhhhhO/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/func-poll.rsthKubhtarget)}(h.. _func-poll:h]h}(h]h ]h"]h$]h&]refid func-polluh1hhKhhhhhhubhsection)}(hhh](htitle)}(h V4L2 poll()h]h V4L2 poll()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h4v4l2-poll - Wait for some event on a file descriptorh]h4v4l2-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](singleV4L.poll (C function) c.V4L.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)}jV4LsbNj)}jjtsb c.V4L.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&]uh1hhjhhhhhKubah}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hWith the :c:func:`poll()` function applications can suspend execution until the driver has captured data or is ready to accept data for output.h](h With the }(hjhhhNhNubh)}(h:c:func:`poll()`h]hliteral)}(hj h]hpoll()}(hjhhhNhNubah}(h]h ](xrefj#c-funceh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdoc!userspace-api/media/v4l/func-poll refdomainj#reftypefunc refexplicitrefwarnjj)}j]jNasb reftargetpolluh1hhhhKhjubhv function applications can suspend execution until the driver has captured data or is ready to accept data for output.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXWhen streaming I/O has been negotiated this function waits until a buffer has been filled by the capture device and can be dequeued with the :ref:`VIDIOC_DQBUF ` ioctl. For output devices this function waits until the device is ready to accept a new buffer to be queued up with the :ref:`VIDIOC_QBUF ` ioctl for display. When buffers are already in the outgoing queue of the driver (capture) or the incoming queue isn't full (display) the function returns immediately.h](hWhen streaming I/O has been negotiated this function waits until a buffer has been filled by the capture device and can be dequeued with the }(hj;hhhNhNubh)}(h!:ref:`VIDIOC_DQBUF `h]hinline)}(hjEh]h VIDIOC_DQBUF}(hjIhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjCubah}(h]h ]h"]h$]h&]refdocj% refdomainjSreftyperef refexplicitrefwarnj/ vidioc_qbufuh1hhhhK#hj;ubhy ioctl. For output devices this function waits until the device is ready to accept a new buffer to be queued up with the }(hj;hhhNhNubh)}(h :ref:`VIDIOC_QBUF `h]jH)}(hjkh]h VIDIOC_QBUF}(hjmhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjiubah}(h]h ]h"]h$]h&]refdocj% refdomainjwreftyperef refexplicitrefwarnj/ vidioc_qbufuh1hhhhK#hj;ubh ioctl for display. When buffers are already in the outgoing queue of the driver (capture) or the incoming queue isn’t full (display) the function returns immediately.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK#hjhhubh)}(hX(On 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 pollfd`` structure is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM`` flags in the ``revents`` field, output devices the ``POLLOUT`` and ``POLLWRNORM`` flags. When the function timed out it returns a value of zero, on failure it returns -1 and the ``errno`` variable is set appropriately. When the application did not call :ref:`VIDIOC_STREAMON ` the :c:func:`poll()` function succeeds, but sets the ``POLLERR`` flag in the ``revents`` field. When the application has called :ref:`VIDIOC_STREAMON ` for a capture device but hasn't yet called :ref:`VIDIOC_QBUF `, the :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in the ``revents`` field. For output devices this same situation will cause :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and ``POLLWRNORM`` flags in the ``revents`` field.h](h On success }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK,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&]uh1j hjubh field of the respective }(hjhhhNhNubj)}(h``struct pollfd``h]h struct pollfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh1 structure is non-zero). Capture devices set the }(hjhhhNhNubj)}(h ``POLLIN``h]hPOLLIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh and }(hjhhhNhNubj)}(h``POLLRDNORM``h]h POLLRDNORM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh flags in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh field, output devices the }(hjhhhNhNubj)}(h ``POLLOUT``h]hPOLLOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh and }(hjhhhNhNubj)}(h``POLLWRNORM``h]h POLLWRNORM}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubha flags. When the function timed out it returns a value of zero, on failure it returns -1 and the }(hjhhhNhNubj)}(h ``errno``h]herrno}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhB variable is set appropriately. When the application did not call }(hjhhhNhNubh)}(h(:ref:`VIDIOC_STREAMON `h]jH)}(hjPh]hVIDIOC_STREAMON}(hjRhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjNubah}(h]h ]h"]h$]h&]refdocj% refdomainj\reftyperef refexplicitrefwarnj/vidioc_streamonuh1hhhhK,hjubh the }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjth]hpoll()}(hjvhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjrubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK,hjubh! function succeeds, but sets the }(hjhhhNhNubj)}(h ``POLLERR``h]hPOLLERR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh flag in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh( field. When the application has called }(hjhhhNhNubh)}(h(:ref:`VIDIOC_STREAMON `h]jH)}(hjh]hVIDIOC_STREAMON}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]refdocj% refdomainjreftyperef refexplicitrefwarnj/vidioc_streamonuh1hhhhK,hjubh. for a capture device but hasn’t yet called }(hjhhhNhNubh)}(h :ref:`VIDIOC_QBUF `h]jH)}(hjh]h VIDIOC_QBUF}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]refdocj% refdomainjreftyperef refexplicitrefwarnj/ vidioc_qbufuh1hhhhK,hjubh, the }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK,hjubh function succeeds and sets the }(hjhhhNhNubj)}(h ``POLLERR``h]hPOLLERR}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh flag in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh: field. For output devices this same situation will cause }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjJh]hpoll()}(hjLhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjHubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK,hjubh% to succeed as well, but it sets the }(hjhhhNhNubj)}(h ``POLLOUT``h]hPOLLOUT}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh and }hjsbj)}(h``POLLWRNORM``h]h POLLWRNORM}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh flags in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh field.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hjhhubh)}(hIf an event occurred (see :ref:`VIDIOC_DQEVENT`) then ``POLLPRI`` will be set in the ``revents`` field and :c:func:`poll()` will return.h](hIf an event occurred (see }(hjhhhNhNubh)}(h:ref:`VIDIOC_DQEVENT`h]jH)}(hjh]hVIDIOC_DQEVENT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]refdocj% refdomainjreftyperef refexplicitrefwarnj/vidioc_dqeventuh1hhhhK>hjubh) then }(hjhhhNhNubj)}(h ``POLLPRI``h]hPOLLPRI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh will be set in the }(hjhhhNhNubj)}(h ``revents``h]hrevents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh field and }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK>hjubh will return.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK>hjhhubh)}(hX|When use of the :c:func:`read()` function has been negotiated and the driver does not capture yet, the :c:func:`poll()` function starts capturing. When that fails it returns a ``POLLERR`` as above. Otherwise it waits until data has been captured and can be read. When the driver captures continuously (as opposed to, for example, still images) the function may return immediately.h](hWhen use of the }(hj hhhNhNubh)}(h:c:func:`read()`h]j)}(hj*h]hread()}(hj,hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/readuh1hhhhKBhj ubhG function has been negotiated and the driver does not capture yet, the }(hj hhhNhNubh)}(h:c:func:`poll()`h]j)}(hjMh]hpoll()}(hjOhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjKubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhKBhj ubh9 function starts capturing. When that fails it returns a }(hj hhhNhNubj)}(h ``POLLERR``h]hPOLLERR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh as above. Otherwise it waits until data has been captured and can be read. When the driver captures continuously (as opposed to, for example, still images) the function may return immediately.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhjhhubh)}(hXWhen use of the :c:func:`write()` function has been negotiated and the driver does not stream yet, the :c:func:`poll()` function starts streaming. When that fails it returns a ``POLLERR`` as above. Otherwise it waits until the driver is ready for a non-blocking :c:func:`write()` call.h](hWhen use of the }(hjhhhNhNubh)}(h:c:func:`write()`h]j)}(hjh]hwrite()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/writeuh1hhhhKIhjubhF function has been negotiated and the driver does not stream yet, the }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhKIhjubh9 function starts streaming. When that fails it returns a }(hjhhhNhNubj)}(h ``POLLERR``h]hPOLLERR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhK as above. Otherwise it waits until the driver is ready for a non-blocking }(hjhhhNhNubh)}(h:c:func:`write()`h]j)}(hjh]hwrite()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/writeuh1hhhhKIhjubh call.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKIhjhhubh)}(hIf the caller is only interested in events (just ``POLLPRI`` is set in the ``events`` field), then :c:func:`poll()` will *not* start streaming if the driver does not stream yet. This makes it possible to just poll for events and not for buffers.h](h1If the caller is only interested in events (just }(hjhhhNhNubj)}(h ``POLLPRI``h]hPOLLPRI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh is set in the }(hjhhhNhNubj)}(h ``events``h]hevents}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh field), then }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hj=h]hpoll()}(hj?hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hj;ubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhKOhjubh will }(hjhhhNhNubhemphasis)}(h*not*h]hnot}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubhw start streaming if the driver does not stream yet. This makes it possible to just poll for events and not for buffers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubh)}(hAll drivers implementing the :c:func:`read()` or :c:func:`write()` function or streaming I/O must also support the :c:func:`poll()` function.h](hAll drivers implementing the }(hjxhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/readuh1hhhhKThjxubh or }(hjxhhhNhNubh)}(h:c:func:`write()`h]j)}(hjh]hwrite()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/writeuh1hhhhKThjxubh1 function or streaming I/O must also support the }(hjxhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhKThjxubh function.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKThjhhubh)}(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&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhKXhjubh manual page.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Return Valueh]h Return Value}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhK[ubh)}(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, }(hj9hhhNhNubh)}(h:c:func:`poll()`h]j)}(hjCh]hpoll()}(hjEhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1j hjAubah}(h]h ]h"]h$]h&]refdocj% refdomainj#reftypefunc refexplicitrefwarnjj+j/polluh1hhhhK]hj9ubh3 returns the number structures which have non-zero }(hj9hhhNhNubj)}(h ``revents``h]hrevents}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj9ubhI fields, or zero if the call timed out. On error -1 is returned, and the }(hj9hhhNhNubj)}(h ``errno``h]herrno}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj9ubh variable is set appropriately:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hj(hhubhdefinition_list)}(hhh](hdefinition_list_item)}(hNEBADF One or more of the ``ufds`` members specify an invalid file descriptor. h](hterm)}(hEBADFh]hEBADF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKchjubh definition)}(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&]uh1j hjubh, members specify an invalid file descriptor.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKchjubj)}(hcEBUSY The driver does not support multiple read or write streams and the device is already in use. h](j)}(hEBUSYh]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKghjubj)}(hhh]h)}(h\The driver does not support multiple read or write streams and the device is already in use.h]h\The driver does not support multiple read or write streams and the device is already in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKghjhhubj)}(h8EFAULT ``ufds`` references an inaccessible memory area. h](j)}(hEFAULTh]hEFAULT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKjhj ubj)}(hhh]h)}(h0``ufds`` references an inaccessible memory area.h](j)}(h``ufds``h]hufds}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh( references an inaccessible memory area.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKjhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKjhjhhubj)}(h,EINTR The call was interrupted by a signal. h](j)}(hEINTRh]hEINTR}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKmhjF 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&]uh1hhhhKmhjX ubah}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ]h"]h$]h&]uh1jhhhKmhjhhubj)}(hhEINVAL The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.h](j)}(hEINVALh]hEINVAL}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKphju ubj)}(hhh]h)}(haThe ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.h](hThe }(hj hhhNhNubj)}(h``nfds``h]hnfds}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh value exceeds the }(hj hhhNhNubj)}(h``RLIMIT_NOFILE``h]h RLIMIT_NOFILE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh value. Use }(hj hhhNhNubj)}(h``getrlimit()``h]h getrlimit()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh to obtain this value.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jhju ubeh}(h]h ]h"]h$]h&]uh1jhhhKphjhhubeh}(h]h ]h"]h$]h&]uh1jhj(hhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhK[ubeh}(h]( v4l2-pollheh ]h"]( v4l2 poll() func-polleh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}j hsexpect_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_handlerj error_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}(j hj j hhjjjjj%j"j j u nametypes}(j j hjjj%j uh}(hhj hhhjjj5j>jjj"jj j(u 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]h/Hyperlink target "func-poll" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j} uba transformerN include_log] decorationNhhub.