1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1. 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 .. c:namespace:: MC.request 2 .. c:namespace:: MC.request 3 3 4 .. _request-func-close: 4 .. _request-func-close: 5 5 6 *************** 6 *************** 7 request close() 7 request close() 8 *************** 8 *************** 9 9 10 Name 10 Name 11 ==== 11 ==== 12 12 13 request-close - Close a request file descripto 13 request-close - Close a request file descriptor 14 14 15 Synopsis 15 Synopsis 16 ======== 16 ======== 17 17 18 .. code-block:: c 18 .. code-block:: c 19 19 20 #include <unistd.h> 20 #include <unistd.h> 21 21 22 .. c:function:: int close( int fd ) 22 .. c:function:: int close( int fd ) 23 23 24 Arguments 24 Arguments 25 ========= 25 ========= 26 26 27 ``fd`` 27 ``fd`` 28 File descriptor returned by :ref:`MEDIA_IO 28 File descriptor returned by :ref:`MEDIA_IOC_REQUEST_ALLOC`. 29 29 30 Description 30 Description 31 =========== 31 =========== 32 32 33 Closes the request file descriptor. Resources 33 Closes the request file descriptor. Resources associated with the request 34 are freed once all file descriptors associated 34 are freed once all file descriptors associated with the request are closed 35 and the driver has completed the request. 35 and the driver has completed the request. 36 See :ref:`here <media-request-life-time>` for 36 See :ref:`here <media-request-life-time>` for more information. 37 37 38 Return Value 38 Return Value 39 ============ 39 ============ 40 40 41 :c:func:`close()` returns 0 on success. On err 41 :c:func:`close()` returns 0 on success. On error, -1 is 42 returned, and ``errno`` is set appropriately. 42 returned, and ``errno`` is set appropriately. Possible error codes are: 43 43 44 EBADF 44 EBADF 45 ``fd`` is not a valid open file descriptor 45 ``fd`` is not a valid open file descriptor.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.