lsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget7/translations/zh_CN/userspace-api/media/v4l/func-selectmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/zh_TW/userspace-api/media/v4l/func-selectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/it_IT/userspace-api/media/v4l/func-selectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ja_JP/userspace-api/media/v4l/func-selectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ko_KR/userspace-api/media/v4l/func-selectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/sp_SP/userspace-api/media/v4l/func-selectmodnameN 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:spacepreserveuh1hhhhhhQ/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/func-select.rsthKubhtarget)}(h.. _func-select:h]h}(h]h ]h"]h$]h&]refid func-selectuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h V4L2 select()h]h V4L2 select()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h*v4l2-select - Synchronous I/O multiplexingh]h*v4l2-select - Synchronous I/O multiplexing}(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 #include #include h]h@#include #include #include }hjsbah}(h]h ]h"]h$]h&]hhforcelanguagechighlight_args}uh1jhhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleV4L.select (C function) c.V4L.selecthNtauh1j&hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(heint select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout )h]hdesc_signature_line)}(hcint select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *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)}(hselecth]h desc_sig_name)}(hselecth]hselect}(hjrhhhNhNubah}(h]h ]nah"]h$]h&]uh1jphjlubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jjhjDhhhhhKubhdesc_parameterlist)}(hY(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)h](hdesc_parameter)}(hint nfdsh](jI)}(hinth]hint}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jHhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubjq)}(hnfdsh]hnfds}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hfd_set *readfdsh](h)}(hhh]jq)}(hfd_seth]hfd_set}(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.selectesbuh1hhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubhdesc_sig_punctuation)}(h*h]h*}(hj hhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubjq)}(hreadfdsh]hreadfds}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hfd_set *writefdsh](h)}(hhh]jq)}(hfd_seth]hfd_set}(hj4hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj1ubah}(h]h ]h"]h$]h&] refdomainj#reftypej reftargetj6modnameN classnameNjj)}j](jNj c.V4L.selectesbuh1hhj-ubjZ)}(h h]h }(hjShhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhj-ubj)}(hj h]h*}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjq)}(hwritefdsh]hwritefds}(hjnhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hfd_set *exceptfdsh](h)}(hhh]jq)}(hfd_seth]hfd_set}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubah}(h]h ]h"]h$]h&] refdomainj#reftypej reftargetjmodnameN classnameNjj)}j](jNj c.V4L.selectesbuh1hhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(h exceptfdsh]h exceptfds}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct timeval *timeouth](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubh)}(hhh]jq)}(htimevalh]htimeval}(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubah}(h]h ]h"]h$]h&] refdomainj#reftypej reftargetjmodnameN classnameNjj)}j](jNj c.V4L.selectesbuh1hhjubjZ)}(h h]h }(hjhhhNhNubah}(h]h ]jfah"]h$]h&]uh1jYhjubj)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(htimeouth]htimeout}(hj9hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubeh}(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&]uh1jhhj9hhhhhKubeh}(h]h ](j#functioneh"]h$]h&]domainj#objtypejvdesctypejvnoindex 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)}(hP``nfds`` The highest-numbered file descriptor in any of the three sets, plus 1. h](hterm)}(h``nfds``h]hliteral)}(hjh]hnfds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hFThe highest-numbered file descriptor in any of the three sets, plus 1.h]hFThe highest-numbered file descriptor in any of the three sets, plus 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hJ``readfds`` File descriptions to be watched if a read() call won't block. h](j)}(h ``readfds``h]j)}(hjh]hreadfds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK!hjubj)}(hhh]h)}(h=File descriptions to be watched if a read() call won't block.h]h?File descriptions to be watched if a read() call won’t block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK!hjhhubj)}(hG``writefds`` File descriptions to be watched if a write() won't block. h](j)}(h ``writefds``h]j)}(hjh]hwritefds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK$hjubj)}(hhh]h)}(h9File descriptions to be watched if a write() won't block.h]h;File descriptions to be watched if a write() won’t block.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK$hjhhubj)}(h?``exceptfds`` File descriptions to be watched for V4L2 events. h](j)}(h ``exceptfds``h]j)}(hjTh]h exceptfds}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhhhK'hjNubj)}(hhh]h)}(h0File descriptions to be watched for V4L2 events.h]h0File descriptions to be watched for V4L2 events.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjiubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhhhK'hjhhubj)}(h"``timeout`` Maximum time to wait. h](j)}(h ``timeout``h]j)}(hjh]htimeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK*hjubj)}(hhh]h)}(hMaximum time to wait.h]hMaximum time to wait.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(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)}(hWith the :c:func:`select()` 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:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](xrefj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc#userspace-api/media/v4l/func-select refdomainj#reftypefunc refexplicitrefwarnjj)}j]jNasb reftargetselectuh1hhhhK/hjubhv 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&]uh1hhhhK/hjhhubh)}(hX When streaming I/O has been negotiated this function waits until a buffer has been filled or displayed and can be dequeued with the :ref:`VIDIOC_DQBUF ` ioctl. When buffers are already in the outgoing queue of the driver the function returns immediately.h](hWhen streaming I/O has been negotiated this function waits until a buffer has been filled or displayed and can be dequeued with the }(hjhhhNhNubh)}(h!:ref:`VIDIOC_DQBUF `h]hinline)}(hjh]h VIDIOC_DQBUF}(hj#hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j!hjubah}(h]h ]h"]h$]h&]refdocj refdomainj-reftyperef refexplicitrefwarnj  vidioc_qbufuh1hhhhK3hjubhf ioctl. When buffers are already in the outgoing queue of the driver the function returns immediately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hXOn success :c:func:`select()` returns the total number of bits set in ``fd_set``. 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_QBUF` or :ref:`VIDIOC_STREAMON` yet the :c:func:`select()` function succeeds, setting the bit of the file descriptor in ``readfds`` or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF ` calls will fail. [#f1]_h](h On success }(hjIhhhNhNubh)}(h:c:func:`select()`h]j)}(hjSh]hselect()}(hjUhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhK8hjIubh) returns the total number of bits set in }(hjIhhhNhNubj)}(h ``fd_set``h]hfd_set}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh[. When the function timed out it returns a value of zero. On failure it returns -1 and the }(hjIhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubhB variable is set appropriately. When the application did not call }(hjIhhhNhNubh)}(h:ref:`VIDIOC_QBUF`h]j")}(hjh]h VIDIOC_QBUF}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j!hjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj  vidioc_qbufuh1hhhhK8hjIubh or }(hjIhhhNhNubh)}(h:ref:`VIDIOC_STREAMON`h]j")}(hjh]hVIDIOC_STREAMON}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j!hjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_streamonuh1hhhhK8hjIubh yet the }(hjIhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhK8hjIubh> function succeeds, setting the bit of the file descriptor in }(hjIhhhNhNubj)}(h ``readfds``h]hreadfds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh or }(hjIhhhNhNubj)}(h ``writefds``h]hwritefds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh, but subsequent }(hjIhhhNhNubh)}(h!:ref:`VIDIOC_DQBUF `h]j")}(hj)h]h VIDIOC_DQBUF}(hj+hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j!hj'ubah}(h]h ]h"]h$]h&]refdocj refdomainj5reftyperef refexplicitrefwarnj  vidioc_qbufuh1hhhhK8hjIubh calls will fail. }(hjIhhhNhNubhfootnote_reference)}(h[#f1]_h]h1}(hjMhhhNhNubah}(h]id1ah ]h"]h$]h&]autoKhf1docnamejuh1jKhjIresolvedKubeh}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hXWhen use of the :c:func:`read()` function has been negotiated and the driver does not capture yet, the :c:func:`select()` function starts capturing. When that fails, :c:func:`select()` returns successful and a subsequent :c:func:`read()` call, which also attempts to start capturing, will return an appropriate error code. When the driver captures continuously (as opposed to, for example, still images) and data is already available the :c:func:`select()` function returns immediately.h](hWhen use of the }(hjfhhhNhNubh)}(h:c:func:`read()`h]j)}(hjph]hread()}(hjrhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj readuh1hhhhKBhjfubhG function has been negotiated and the driver does not capture yet, the }(hjfhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKBhjfubh- function starts capturing. When that fails, }(hjfhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKBhjfubh% returns successful and a subsequent }(hjfhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj readuh1hhhhKBhjfubh call, which also attempts to start capturing, will return an appropriate error code. When the driver captures continuously (as opposed to, for example, still images) and data is already available the }(hjfhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKBhjfubh function returns immediately.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhjhhubh)}(hWhen use of the :c:func:`write()` function has been negotiated the :c:func:`select()` function just waits until the driver is ready for a non-blocking :c:func:`write()` call.h](hWhen use of the }(hj#hhhNhNubh)}(h:c:func:`write()`h]j)}(hj-h]hwrite()}(hj/hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj writeuh1hhhhKKhj#ubh" function has been negotiated the }(hj#hhhNhNubh)}(h:c:func:`select()`h]j)}(hjPh]hselect()}(hjRhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKKhj#ubhB function just waits until the driver is ready for a non-blocking }(hj#hhhNhNubh)}(h:c:func:`write()`h]j)}(hjsh]hwrite()}(hjuhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj writeuh1hhhhKKhj#ubh call.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(hAll drivers implementing the :c:func:`read()` or :c:func:`write()` function or streaming I/O must also support the :c:func:`select()` function.h](hAll drivers implementing the }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj readuh1hhhhKOhjubh or }(hjhhhNhNubh)}(h:c:func:`write()`h]j)}(hjh]hwrite()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj writeuh1hhhhKOhjubh1 function or streaming I/O must also support the }(hjhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKOhjubh function.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubh)}(h8For more details see the :c:func:`select()` manual page.h](hFor more details see the }(hjhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKShjubh manual page.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKShjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK-ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhKVubh)}(hX(On success, :c:func:`select()` returns the number of descriptors contained in the three returned descriptor sets, which will be zero if the timeout expired. On error -1 is returned, and the ``errno`` variable is set appropriately; the sets and ``timeout`` are undefined. Possible error codes are:h](h On success, }(hj[hhhNhNubh)}(h:c:func:`select()`h]j)}(hjeh]hselect()}(hjghhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKXhj[ubh returns the number of descriptors contained in the three returned descriptor sets, which will be zero if the timeout expired. On error -1 is returned, and the }(hj[hhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh- variable is set appropriately; the sets and }(hj[hhhNhNubj)}(h ``timeout``h]htimeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh) are undefined. Possible error codes are:}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjJhhubj)}(hhh](j)}(h\EBADF One or more of the file descriptor sets specified a file descriptor that is not open. h](j)}(hEBADFh]hEBADF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK`hjubj)}(hhh]h)}(hUOne or more of the file descriptor sets specified a file descriptor that is not open.h]hUOne or more of the file descriptor sets specified a file descriptor that is not open.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK`hjubj)}(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&]uh1jhhhKdhjubj)}(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&]uh1hhhhKchjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKdhjhhubj)}(hsEFAULT The ``readfds``, ``writefds``, ``exceptfds`` or ``timeout`` pointer references an inaccessible memory area. h](j)}(hEFAULTh]hEFAULT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhhj ubj)}(hhh]h)}(hkThe ``readfds``, ``writefds``, ``exceptfds`` or ``timeout`` pointer references an inaccessible memory area.h](hThe }(hj& hhhNhNubj)}(h ``readfds``h]hreadfds}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh, }(hj& hhhNhNubj)}(h ``writefds``h]hwritefds}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh, }hj& sbj)}(h ``exceptfds``h]h exceptfds}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh or }(hj& hhhNhNubj)}(h ``timeout``h]htimeout}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh0 pointer references an inaccessible memory area.}(hj& hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKghj# ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhhjhhubj)}(h,EINTR The call was interrupted by a signal. h](j)}(hEINTRh]hEINTR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKkhj 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&]uh1hhhhKkhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKkhjhhubj)}(hOEINVAL The ``nfds`` argument is less than zero or greater than ``FD_SETSIZE``. h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKohj ubj)}(hhh]h)}(hGThe ``nfds`` argument is less than zero or greater than ``FD_SETSIZE``.h](hThe }(hj hhhNhNubj)}(h``nfds``h]hnfds}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, argument is less than zero or greater than }(hj hhhNhNubj)}(h``FD_SETSIZE``h]h FD_SETSIZE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKnhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKohjhhubeh}(h]h ]h"]h$]h&]uh1jhjJhhhhhNubhfootnote)}(hThe Linux kernel implements :c:func:`select()` like the :c:func:`poll()` function, but :c:func:`select()` cannot return a ``POLLERR``.h](hlabel)}(hhh]h1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhNhNubh)}(hThe Linux kernel implements :c:func:`select()` like the :c:func:`poll()` function, but :c:func:`select()` cannot return a ``POLLERR``.h](hThe Linux kernel implements }(hj% hhhNhNubh)}(h:c:func:`select()`h]j)}(hj/ h]hselect()}(hj1 hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj- ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKrhj% ubh like the }(hj% hhhNhNubh)}(h:c:func:`poll()`h]j)}(hjR h]hpoll()}(hjT hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj polluh1hhhhKrhj% ubh function, but }(hj% hhhNhNubh)}(h:c:func:`select()`h]j)}(hju h]hselect()}(hjw hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjs ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjjj selectuh1hhhhKrhj% ubh cannot return a }(hj% hhhNhNubj)}(h ``POLLERR``h]hPOLLERR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj% ubh.}(hj% hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhj ubeh}(h]j]ah ]h"]f1ah$]h&]jWaj\Kj^juh1j hhhKqhjJhhubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKVubeh}(h]( v4l2-selectheh ]h"]( v4l2 select() func-selecteh$]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}f1]jMasrefids}(h]haj]]jMaunameids}(j hj j hhjjjjjGjDj j j j]u nametypes}(j j hjjjGj j uh}(hhj hhhjjj5j>jjjDjjWjMj jJj]j u footnote_refs}j- ]jMas citation_refs} autofootnotes]j aautofootnote_refs]jMasymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h1Hyperlink target "func-select" is not referenced.}hj[ sbah}(h]h ]h"]h$]h&]uh1hhjX ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jV uba transformerN include_log] decorationNhhub.