7.68. V4L2 munmap()

7.68.1. 名稱

v4l2-munmap - 取消對映裝置記憶體

7.68.2. 概要

#include <unistd.h>
#include <sys/mman.h>
int munmap(void *start, size_t length)

7.68.3. 引數

start

mmap()函式返回的對映緩衝區的地址。

length

對映緩衝區的長度。 這必須與傳遞給mmap()的相同值,並由驅動程式在struct v4l2_buffer length欄位(對於單平面API)和在struct v4l2_plane length欄位(對於多平面API)中返回。

7.68.4. 描述

取消對映先前使用mmap()函式對映的緩衝區,並在可能的情況下釋放它。

7.68.5. 返回值

成功時,munmap()返回0,失敗時返回-1,並且errno變數被適當設定

EINVAL

startlength不正確,或者尚未對映任何緩衝區。