~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/v4l/func-poll.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/v4l/func-poll.rst (Version linux-6.12-rc7) and /Documentation/userspace-api/media/v4l/func-poll.rst (Version linux-4.4.302)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari    
  2 .. c:namespace:: V4L                              
  3                                                   
  4 .. _func-poll:                                    
  5                                                   
  6 ***********                                       
  7 V4L2 poll()                                       
  8 ***********                                       
  9                                                   
 10 Name                                              
 11 ====                                              
 12                                                   
 13 v4l2-poll - Wait for some event on a file desc    
 14                                                   
 15 Synopsis                                          
 16 ========                                          
 17                                                   
 18 .. code-block:: c                                 
 19                                                   
 20     #include <sys/poll.h>                         
 21                                                   
 22 .. c:function:: int poll( struct pollfd *ufds,    
 23                                                   
 24 Arguments                                         
 25 =========                                         
 26                                                   
 27                                                   
 28 Description                                       
 29 ===========                                       
 30                                                   
 31 With the :c:func:`poll()` function application    
 32 until the driver has captured data or is ready    
 33 output.                                           
 34                                                   
 35 When streaming I/O has been negotiated this fu    
 36 buffer has been filled by the capture device a    
 37 the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. F    
 38 function waits until the device is ready to ac    
 39 queued up with the :ref:`VIDIOC_QBUF <VIDIOC_Q    
 40 display. When buffers are already in the outgo    
 41 (capture) or the incoming queue isn't full (di    
 42 returns immediately.                              
 43                                                   
 44 On success :c:func:`poll()` returns the number    
 45 that have been selected (that is, file descrip    
 46 ``revents`` field of the respective ``struct p    
 47 is non-zero). Capture devices set the ``POLLIN    
 48 flags in the ``revents`` field, output devices    
 49 ``POLLWRNORM`` flags. When the function timed     
 50 zero, on failure it returns -1 and the ``errno    
 51 appropriately. When the application did not ca    
 52 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :    
 53 function succeeds, but sets the ``POLLERR`` fl    
 54 field. When the application has called            
 55 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a    
 56 hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QB    
 57 :c:func:`poll()` function succeeds and sets th    
 58 the ``revents`` field. For output devices this    
 59 :c:func:`poll()` to succeed as well, but it se    
 60 ``POLLWRNORM`` flags in the ``revents`` field.    
 61                                                   
 62 If an event occurred (see :ref:`VIDIOC_DQEVENT    
 63 then ``POLLPRI`` will be set in the ``revents`    
 64 :c:func:`poll()` will return.                     
 65                                                   
 66 When use of the :c:func:`read()` function has     
 67 driver does not capture yet, the :c:func:`poll    
 68 capturing. When that fails it returns a ``POLL    
 69 it waits until data has been captured and can     
 70 captures continuously (as opposed to, for exam    
 71 function may return immediately.                  
 72                                                   
 73 When use of the :c:func:`write()` function has    
 74 driver does not stream yet, the :c:func:`poll(    
 75 streaming. When that fails it returns a ``POLL    
 76 it waits until the driver is ready for a non-b    
 77 :c:func:`write()` call.                           
 78                                                   
 79 If the caller is only interested in events (ju    
 80 the ``events`` field), then :c:func:`poll()` w    
 81 streaming if the driver does not stream yet. T    
 82 just poll for events and not for buffers.         
 83                                                   
 84 All drivers implementing the :c:func:`read()`     
 85 function or streaming I/O must also support th    
 86 function.                                         
 87                                                   
 88 For more details see the :c:func:`poll()` manu    
 89                                                   
 90 Return Value                                      
 91 ============                                      
 92                                                   
 93 On success, :c:func:`poll()` returns the numbe    
 94 non-zero ``revents`` fields, or zero if the ca    
 95 is returned, and the ``errno`` variable is set    
 96                                                   
 97 EBADF                                             
 98     One or more of the ``ufds`` members specif    
 99     descriptor.                                   
100                                                   
101 EBUSY                                             
102     The driver does not support multiple read     
103     device is already in use.                     
104                                                   
105 EFAULT                                            
106     ``ufds`` references an inaccessible memory    
107                                                   
108 EINTR                                             
109     The call was interrupted by a signal.         
110                                                   
111 EINVAL                                            
112     The ``nfds`` value exceeds the ``RLIMIT_NO    
113     ``getrlimit()`` to obtain this value.         
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php