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::multichannel::stream< channel_t >::in Class Reference

kernel stream mapped client reference counted in channel buffers More...

#include <dxd_stream.h>

+ Inheritance diagram for dxd::multichannel::stream< channel_t >::in:
+ Collaboration diagram for dxd::multichannel::stream< channel_t >::in:

Public Member Functions

 in ()
 

Protected Member Functions

void free ()
 
void free ()
 kernel map free More...
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const ::MDL *mdl)
 
os_result initialize (const ::MDL *mdl)
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const ::MDL *mdl, size_t offset, size_t size)
 
os_result initialize (const ::MDL *mdl, size_t offset, size_t size)
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset=0)
 IOKit kernel map initializer. More...
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 IOKit buffer initializer. More...
 
 operator channel_t * () const
 
 operator const ::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast. More...
 
 operator const ::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast. More...
 
 operator const ::IOMemoryMap * () const
 
 operator const channel_t * () const
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory) More...
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory) More...
 
const channel_t * operator-> () const
 operator to use mapping like pointer More...
 
channel_t * operator-> ()
 
 operator::IOMemoryDescriptor * ()
 
 operator::IOMemoryDescriptor * ()
 
 operator::IOMemoryMap * ()
 
 operator::MDL * () const
 
 operator::MDL * () const
 
size_t size () const
 IOKit memory size. More...
 
size_t size () const
 IOKit memory size. More...
 
size_t size () const
 kernel mapping size More...
 

Protected Attributes

channel_t * _vm
 kernel virtual address mapping More...
 
::IOMemoryMap * iokit_memory_map
 
os_result status
 IOKit memory status. More...
 
os_result status
 IOKit memory status. More...
 
os_result status
 status of mapping object More...
 

Friends

class stream
 

Detailed Description

template<typename channel_t = int>
class dxd::multichannel::stream< channel_t >::in

kernel stream mapped client reference counted in channel buffers

Constructor & Destructor Documentation

template<typename channel_t = int>
dxd::multichannel::stream< channel_t >::in::in ( )
inline

Member Function Documentation

void dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::free ( )
inlineinherited
void dxd::map< scope_t, channel_t >::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.

os_result dxd::memory< scope_t >::initialize ( const void *  data,
size_t  size 
)
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
os_result dxd::memory< scope_t >::initialize ( const void *  data,
size_t  size 
)
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl)
inlineinherited

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

+ Here is the call graph for this function:

os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl)
inlineinherited

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

os_result dxd::memory< scope_t >::initialize ( void *  data,
size_t  size 
)
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
os_result dxd::memory< scope_t >::initialize ( void *  data,
size_t  size 
)
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl,
size_t  offset,
size_t  size 
)
inlineinherited
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl,
size_t  offset,
size_t  size 
)
inlineinherited

+ Here is the call graph for this function:

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor)
inlineinherited

IOKit memory initializer.

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor)
inlineinherited

IOKit memory initializer.

+ Here is the call graph for this function:

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor,
size_t  offset,
size_t  size 
)
inlineinherited

IOKit memory initializer.

+ Here is the call graph for this function:

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor,
size_t  offset,
size_t  size 
)
inlineinherited

IOKit memory initializer.

os_result dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t  size,
unsigned int  limit = limit_t,
unsigned int  alignment = alignment_t,
bool  contigous = contigous_t 
)
inlineinherited

Allows re-initialization

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
os_result dxd::map< scope_t, channel_t >::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::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t  size,
unsigned int  limit = limit_t,
unsigned int  alignment = alignment_t,
bool  contigous = contigous_t 
)
inlineinherited

IOKit buffer initializer.

Allows re-initialization.

Creates a buffer and associated memory descriptor.

Wires down the backing store memory.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
dxd::map< scope_t, channel_t >::operator channel_t * ( ) const
inlineinherited
dxd::memory< scope_t >::operator const ::IOMemoryDescriptor * ( ) const
inlineinherited

IOKit IOMemoryDescriptor* implicit cast.

dxd::memory< scope_t >::operator const ::IOMemoryDescriptor * ( ) const
inlineinherited

IOKit IOMemoryDescriptor* implicit cast.

dxd::map< scope_t, channel_t >::operator const ::IOMemoryMap * ( ) const
inlineinherited
dxd::map< scope_t, channel_t >::operator const channel_t * ( ) const
inlineinherited
dxd::memory< scope_t >::operator uint64_t ( ) const
inlineinherited

IOKit physical address (only relevant for contigous memory)

dxd::memory< scope_t >::operator uint64_t ( ) const
inlineinherited

IOKit physical address (only relevant for contigous memory)

const channel_t * dxd::map< scope_t, channel_t >::operator-> ( ) const
inlineinherited

operator to use mapping like pointer

channel_t * dxd::map< scope_t, channel_t >::operator-> ( )
inlineinherited
dxd::memory< scope_t >::operator::IOMemoryDescriptor * ( )
inlineinherited
dxd::memory< scope_t >::operator::IOMemoryDescriptor * ( )
inlineinherited
dxd::map< scope_t, channel_t >::operator::IOMemoryMap * ( )
inlineinherited
dxd::memory< scope_t >::operator::MDL * ( ) const
inlineinherited
dxd::memory< scope_t >::operator::MDL * ( ) const
inlineinherited
size_t dxd::memory< scope_t >::size ( ) const
inlineinherited

IOKit memory size.

size_t dxd::memory< scope_t >::size ( ) const
inlineinherited

IOKit memory size.

size_t dxd::map< scope_t, channel_t >::size ( ) const
inlineinherited

kernel mapping size

Friends And Related Function Documentation

template<typename channel_t = int>
friend class stream
friend

Member Data Documentation

channel_t * dxd::map< scope_t, channel_t >::_vm
protectedinherited

kernel virtual address mapping

::IOMemoryMap* dxd::map< scope_t, channel_t >::iokit_memory_map
protectedinherited
os_result dxd::memory< scope_t >::status
inherited

IOKit memory status.

status of memory object

os_result dxd::memory< scope_t >::status
inherited

IOKit memory status.

status of memory object

os_result dxd::map< scope_t, channel_t >::status
inherited

status of mapping object


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.