Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: MC
0003 
0004 .. _media_request_ioc_reinit:
0005 
0006 ******************************
0007 ioctl MEDIA_REQUEST_IOC_REINIT
0008 ******************************
0009 
0010 Name
0011 ====
0012 
0013 MEDIA_REQUEST_IOC_REINIT - Re-initialize a request
0014 
0015 Synopsis
0016 ========
0017 
0018 .. c:macro:: MEDIA_REQUEST_IOC_REINIT
0019 
0020 ``int ioctl(int request_fd, MEDIA_REQUEST_IOC_REINIT)``
0021 
0022 Arguments
0023 =========
0024 
0025 ``request_fd``
0026     File descriptor returned by :ref:`MEDIA_IOC_REQUEST_ALLOC`.
0027 
0028 Description
0029 ===========
0030 
0031 If the media device supports :ref:`requests <media-request-api>`, then
0032 this request ioctl can be used to re-initialize a previously allocated
0033 request.
0034 
0035 Re-initializing a request will clear any existing data from the request.
0036 This avoids having to :c:func:`close()` a completed
0037 request and allocate a new request. Instead the completed request can just
0038 be re-initialized and it is ready to be used again.
0039 
0040 A request can only be re-initialized if it either has not been queued
0041 yet, or if it was queued and completed. Otherwise it will set ``errno``
0042 to ``EBUSY``. No other error codes can be returned.
0043 
0044 Return Value
0045 ============
0046 
0047 On success 0 is returned, on error -1 and the ``errno`` variable is set
0048 appropriately.
0049 
0050 EBUSY
0051     The request is queued but not yet completed.