xsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget4/translations/zh_CN/userspace-api/media/dvb/dmx-mmapmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/zh_TW/userspace-api/media/dvb/dmx-mmapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/it_IT/userspace-api/media/dvb/dmx-mmapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ja_JP/userspace-api/media/dvb/dmx-mmapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ko_KR/userspace-api/media/dvb/dmx-mmapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/sp_SP/userspace-api/media/dvb/dmx-mmapmodnameN 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:spacepreserveuh1hhhhhhN/var/lib/git/docbuild/linux/Documentation/userspace-api/media/dvb/dmx-mmap.rsthKubhtarget)}(h .. _dmx-mmap:h]h}(h]h ]h"]h$]h&]refiddmx-mmapuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hDigital TV mmap()h]hDigital TV mmap()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h;dmx-mmap - Map device memory into application address spaceh]h;dmx-mmap - Map device memory into application address space}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhwarning)}(hthis API is still experimentalh]h)}(hhh]hthis API is still experimental}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh literal_block)}(h)#include #include h]h)#include #include }hj,sbah}(h]h ]h"]h$]h&]hhforcelanguagechighlight_args}uh1j*hhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleDTV.dmx.mmap (C function)c.DTV.dmx.mmaphNtauh1j?hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hSvoid *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset )h]hdesc_signature_line)}(hQvoid *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]ktah"]h$]h&]uh1jahj]hhhhhKubhdesc_sig_space)}(h h]h }(hjthhhNhNubah}(h]h ]wah"]h$]h&]uh1jrhj]hhhhhKubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj]hhhhhKubh desc_name)}(hmmaph]h desc_sig_name)}(hmmaph]hmmap}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhj]hhhhhKubhdesc_parameterlist)}(hG(void *start, size_t length, int prot, int flags, int fd, off_t offset)h](hdesc_parameter)}(h void *starth](jb)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubjs)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hstarth]hstart}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h size_t lengthh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj<reftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data](j ASTIdentifier)}jDTVsbNj')}jdmxsbNj')}jjsbc.DTV.dmx.mmapesbuh1hhjubjs)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(hlengthh]hlength}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint proth](jb)}(hinth]hint}(hj[hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjWubjs)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjWubj)}(hproth]hprot}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h int flagsh](jb)}(hinth]hint}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubjs)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint fdh](jb)}(hinth]hint}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubjs)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(hfdh]hfd}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h off_t offseth](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj<reftypej reftargetjmodnameN classnameNjj!)}j$](j(Nj,Nj0c.DTV.dmx.mmapesbuh1hhjubjs)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(hoffseth]hoffset}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj]hhhhhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j[sphinx_line_type declaratorhjWhhhhhKubah}(h]jNah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jUhhhKhjRhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jZhjRhhhhhKubeh}(h]h ](j<functioneh"]h$]h&]domainj<objtypejhdesctypejhnoindex noindexentrynocontentsentryuh1jPhhhjhNhNubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(hX?``start`` Map the buffer to this address in the application's address space. When the ``MAP_FIXED`` flag is specified, ``start`` must be a multiple of the pagesize and mmap will fail when the specified address cannot be used. Use of this option is discouraged; applications should just specify a ``NULL`` pointer here. h](hterm)}(h ``start``h]hliteral)}(hjh]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK#hjubh definition)}(hhh]h)}(hX4Map the buffer to this address in the application's address space. When the ``MAP_FIXED`` flag is specified, ``start`` must be a multiple of the pagesize and mmap will fail when the specified address cannot be used. Use of this option is discouraged; applications should just specify a ``NULL`` pointer here.h](hNMap the buffer to this address in the application’s address space. When the }(hjhhhNhNubj)}(h ``MAP_FIXED``h]h MAP_FIXED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag is specified, }(hjhhhNhNubj)}(h ``start``h]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must be a multiple of the pagesize and mmap will fail when the specified address cannot be used. Use of this option is discouraged; applications should just specify a }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh pointer here.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK#hjubj)}(hv``length`` Length of the memory area to map. This must be a multiple of the DVB packet length (188, on most drivers). h](j)}(h ``length``h]j)}(hj h]hlength}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhK'hjubj)}(hhh]h)}(hjLength of the memory area to map. This must be a multiple of the DVB packet length (188, on most drivers).h]hjLength of the memory area to map. This must be a multiple of the DVB packet length (188, on most drivers).}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK'hjhhubj)}(hX+``prot`` The ``prot`` argument describes the desired memory protection. Regardless of the device type and the direction of data exchange it should be set to ``PROT_READ`` | ``PROT_WRITE``, permitting read and write access to image buffers. Drivers should support at least this combination of flags. h](j)}(h``prot``h]j)}(hjDh]hprot}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1jhhhK.hj>ubj)}(hhh]h)}(hX!The ``prot`` argument describes the desired memory protection. Regardless of the device type and the direction of data exchange it should be set to ``PROT_READ`` | ``PROT_WRITE``, permitting read and write access to image buffers. Drivers should support at least this combination of flags.h](hThe }(hj\hhhNhNubj)}(h``prot``h]hprot}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh argument describes the desired memory protection. Regardless of the device type and the direction of data exchange it should be set to }(hj\hhhNhNubj)}(h ``PROT_READ``h]h PROT_READ}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh | }(hj\hhhNhNubj)}(h``PROT_WRITE``h]h PROT_WRITE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubho, permitting read and write access to image buffers. Drivers should support at least this combination of flags.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjYubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhhhK.hjhhubj)}(hX)``flags`` The ``flags`` parameter specifies the type of the mapped object, mapping options and whether modifications made to the mapped copy of the page are private to the process or are to be shared with other references. ``MAP_FIXED`` requests that the driver selects no other address than the one specified. If the specified address cannot be used, :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified, ``start`` must be a multiple of the pagesize. Use of this option is discouraged. One of the ``MAP_SHARED`` or ``MAP_PRIVATE`` flags must be set. ``MAP_SHARED`` allows applications to share the mapped memory with other (e. g. child-) processes. .. note:: The Linux Digital TV applications should not set the ``MAP_PRIVATE``, ``MAP_DENYWRITE``, ``MAP_EXECUTABLE`` or ``MAP_ANON`` flags. h](j)}(h ``flags``h]j)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKDhjubj)}(hhh](h)}(hThe ``flags`` parameter specifies the type of the mapped object, mapping options and whether modifications made to the mapped copy of the page are private to the process or are to be shared with other references.h](hThe }(hjhhhNhNubj)}(h ``flags``h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh parameter specifies the type of the mapped object, mapping options and whether modifications made to the mapped copy of the page are private to the process or are to be shared with other references.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK1hjubh)}(hX ``MAP_FIXED`` requests that the driver selects no other address than the one specified. If the specified address cannot be used, :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified, ``start`` must be a multiple of the pagesize. Use of this option is discouraged.h](j)}(h ``MAP_FIXED``h]h MAP_FIXED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubht requests that the driver selects no other address than the one specified. If the specified address cannot be used, }(hjhhhNhNubh)}(h:c:func:`mmap()`h]j)}(hjh]hmmap()}(hjhhhNhNubah}(h]h ](xrefj<c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc userspace-api/media/dvb/dmx-mmap refdomainj<reftypefunc refexplicitrefwarnjj!)}j$](j(Nj,Nesb reftargetmmapuh1hhhhK6hjubh will fail. If }(hjhhhNhNubj)}(h ``MAP_FIXED``h]h MAP_FIXED}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is specified, }(hjhhhNhNubj)}(h ``start``h]hstart}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG must be a multiple of the pagesize. Use of this option is discouraged.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK6hjubh)}(hOne of the ``MAP_SHARED`` or ``MAP_PRIVATE`` flags must be set. ``MAP_SHARED`` allows applications to share the mapped memory with other (e. g. child-) processes.h](h One of the }(hjUhhhNhNubj)}(h``MAP_SHARED``h]h MAP_SHARED}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh or }(hjUhhhNhNubj)}(h``MAP_PRIVATE``h]h MAP_PRIVATE}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh flags must be set. }(hjUhhhNhNubj)}(h``MAP_SHARED``h]h MAP_SHARED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubhT allows applications to share the mapped memory with other (e. g. child-) processes.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK