dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::stream::umap< stream_t > Class Template Reference

stream user mapping More...

#include <dxd_stream.h>

+ Inheritance diagram for dxd::stream::umap< stream_t >:
+ Collaboration diagram for dxd::stream::umap< stream_t >:

Public Member Functions

void free ()
 kernel map free More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset=0)
 IOKit kernel map initializer. More...
 
os_result initialize (::mach_port_t port, const dx::os_event &os_event)
 
os_result initialize (client &, const dx::os_event &os_event)
 
 operator const ::IOMemoryMap * () const
 
 operator const dx::circular * () const
 
 operator dx::circular * () const
 
const dx::circularoperator-> () const
 operator to use mapping like pointer More...
 
dx::circularoperator-> ()
 
 operator::IOMemoryMap * ()
 
template<typename reference_t >
int release (reference_t &reference)
 
os_result reset ()
 
void retain ()
 
os_result signal ()
 
os_result signal ()
 
size_t size () const
 kernel mapping size More...
 
os_result start ()
 
os_result stop (bool force=false)
 
 umap (client &client, const dx::os_event &os_event, stream_t *&stream)
 
 ~umap ()
 

Public Attributes

os_result status
 status of mapping object More...
 
os_result status =not_initialized
 

Protected Attributes

dx::circular_vm
 kernel virtual address mapping More...
 
::IOMemoryMap * iokit_memory_map
 
stream_t *& stream
 auto nulling reference More...
 

Detailed Description

template<typename stream_t = stream>
class dxd::stream::umap< stream_t >

stream user mapping

Constructor & Destructor Documentation

template<typename stream_t = stream>
dxd::stream::umap< stream_t >::umap ( client client,
const dx::os_event os_event,
stream_t *&  stream 
)
inline

+ Here is the call graph for this function:

template<typename stream_t = stream>
dxd::stream::umap< stream_t >::~umap ( )
inline

releases this stream reference and nulls stream pointer if it was the last reference

+ Here is the call graph for this function:

Member Function Documentation

void dxd::map< scope_t, dx::circular >::free ( )
inlineinherited

kernel map free

Checks if kernel mapping already exists and

does not call unmap(): IOMemoryMap instances will unmap themselves upon free, ie. when the last client with a reference calls release. unmap() forces the IOMemoryMap to destroy the mapping it represents, regardless of the number of clients. releases the map object.

+ Here is the caller graph for this function:

os_result dxd::map< scope_t, dx::circular >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor,
size_t  offset = 0 
)
inlineinherited

IOKit kernel map initializer.

map<kernel> maps an IOMemoryDescriptor (typically cast of a dxd::memory or buffer class) into the kernel address space.

https://developer.apple.com/library/content/qa/qa1197/_index.html

Allows re-initialization.

Checks buffer object,

maps the buffer into the kernel (will fail if offset is given)

and obtains a kernel virtual address (apply offset here instead).

Parameters
iokit_memory_descriptorIOMemoryDescriptor to be mapped into the kernel address space
offsetoffset into memory descriptor to create mapping
os_result dxd::event< dx::user >::initialize ( ::mach_port_t  port,
const dx::os_event< dx::user > &  os_event 
)
inlineinherited

undocumented OSX hack: mark 64bit async ref

os_result dxd::event< dx::user >::initialize ( client ,
const dx::os_event< dx::user > &  os_event 
)
inlineinherited
dxd::map< scope_t, dx::circular >::operator const ::IOMemoryMap * ( ) const
inlineinherited
dxd::map< scope_t, dx::circular >::operator const dx::circular * ( ) const
inlineinherited
dxd::map< scope_t, dx::circular >::operator dx::circular * ( ) const
inlineinherited
const dx::circular * dxd::map< scope_t, dx::circular >::operator-> ( ) const
inlineinherited

operator to use mapping like pointer

dx::circular * dxd::map< scope_t, dx::circular >::operator-> ( )
inlineinherited
dxd::map< scope_t, dx::circular >::operator::IOMemoryMap * ( )
inlineinherited
template<typename reference_t >
int dxd::referenced::release ( reference_t &  reference)
inlineinherited
os_result dxd::event< dx::user >::reset ( )
inlineinherited
void dxd::referenced::retain ( )
inlineinherited

+ Here is the caller graph for this function:

os_result dxd::event< dx::user >::signal ( )
inlineinherited
os_result dxd::event< dx::user >::signal ( )
inlineinherited
size_t dxd::map< scope_t, dx::circular >::size ( ) const
inlineinherited

kernel mapping size

template<typename stream_t = stream>
os_result dxd::stream::umap< stream_t >::start ( )
inline
template<typename stream_t = stream>
os_result dxd::stream::umap< stream_t >::stop ( bool  force = false)
inline

+ Here is the caller graph for this function:

Member Data Documentation

dx::circular * dxd::map< scope_t, dx::circular >::_vm
protectedinherited

kernel virtual address mapping

::IOMemoryMap* dxd::map< scope_t, dx::circular >::iokit_memory_map
protectedinherited
os_result dxd::map< scope_t, dx::circular >::status
inherited

status of mapping object

template<typename stream_t = stream>
stream_t*& dxd::stream::umap< stream_t >::stream
protected

auto nulling reference


The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Dec 4 2018

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.