dxd - dynax driver framework 2.6.0d205
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::stream Class Referenceabstract

generic kernel stream More...

#include <dxd_stream.h>

Inheritance diagram for dxd::stream:
Collaboration diagram for dxd::stream:

Classes

struct  opened
 generic streaming interface description More...
class  umap
 stream user mapping More...

Public Member Functions

return_t each (exec_t exec)
void free ()
void free ()
 kernel map free
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer.
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer.
os_result initialize (const void *data, size_t size)
 IOKit memory initializer from kernel virtual addresses.
os_result initialize (const void *data, size_t size)
 IOKit memory initializer.
os_result initialize (const::MDL *mdl)
os_result initialize (const::MDL *mdl, size_t offset, size_t size)
os_result initialize (size_t size, unsigned int limit=64, unsigned int alignment=0, bool contigous=false)
 IOKit buffer initializer.
os_result initialize (void *data, size_t size)
 IOKit memory initializer from kernel virtual addresses.
os_result initialize (void *data, size_t size)
 IOKit memory initializer.
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset=0)
 IOKit kernel map initializer.
 operator const dx::circular * () const
 operator const::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast.
 operator const::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast.
 operator const::IOMemoryMap * () const
 operator dx::circular * () const
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory).
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory).
const dx::circularoperator-> () const
 operator to use mapping like pointer
 operator::IOMemoryDescriptor * ()
 operator::IOMemoryDescriptor * ()
 operator::IOMemoryMap * ()
 operator::MDL * () const
 operator::MDL * () const
doubly::linked::abstract::eventpop ()
 pop item from head
doubly::linked::abstract::eventpop (doubly::linked::abstract::event *item)
 pop item
listprint ()
doubly::linked::abstract::eventpush (doubly::linked::abstract::event *item)
 push item to head
template<typename reference_t>
int release (reference_t &reference)
void retain ()
os_result signal ()
size_t size () const
 IOKit memory size.
size_t size () const
 IOKit memory size.
size_t size () const
 kernel mapping size
virtual os_result start (bool force=false)=0
virtual os_result stop (bool force=false)=0
 stream (size_t size, unsigned int limit=64, unsigned int align=0, bool contigous=false)

Public Attributes

atomic< int > references {}
os_result status
 IOKit memory status.
os_result status
 IOKit memory status.
os_result status
 status of mapping object

Protected Member Functions

 stream ()=default
virtual ~stream ()=default

Protected Attributes

dx::circular_vm
 kernel virtual address mapping
::IOMemoryMap * iokit_memory_map

Detailed Description

generic kernel stream

Constructor & Destructor Documentation

◆ ~stream()

virtual dxd::stream::~stream ( )
protectedvirtualdefault

◆ stream() [1/2]

dxd::stream::stream ( )
protecteddefault

◆ stream() [2/2]

dxd::stream::stream ( size_t size,
unsigned int limit = 64,
unsigned int align = 0,
bool contigous = false )
inline
Here is the call graph for this function:

Member Function Documentation

◆ each()

return_t dxd::linked::list< doubly::linked::abstract::event >::each ( exec_t exec)
inlineinherited
Here is the caller graph for this function:

◆ free() [1/2]

void dxd::buffer< scope_t, 64, 0, false >::free ( )
inlineinherited

◆ free() [2/2]

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.

◆ initialize() [1/10]

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

IOKit memory initializer.

◆ initialize() [2/10]

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

IOKit memory initializer.

◆ initialize() [3/10]

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

IOKit memory initializer from kernel virtual addresses.

Allows re-initialization.

Creates OS memory descriptor from kernel space data,size and

wires it down and synchronizes it.

Parameters
datavirtual read only kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ initialize() [4/10]

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

◆ initialize() [5/10]

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!

◆ initialize() [6/10]

os_result dxd::memory< scope_t >::initialize ( const::MDL * mdl,
size_t offset,
size_t size )
inlineinherited

◆ initialize() [7/10]

os_result dxd::buffer< scope_t, 64, 0, false >::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

◆ initialize() [8/10]

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

IOKit memory initializer from kernel virtual addresses.

Allows re-initialization.

Creates OS memory descriptor from kernel space data,size and

wires it down and synchronizes it.

Parameters
datavirtual kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ initialize() [9/10]

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

◆ initialize() [10/10]

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

◆ operator const dx::circular *()

dxd::map< scope_t, dx::circular >::operator const dx::circular * ( ) const
inlineinherited

◆ operator const::IOMemoryDescriptor *() [1/2]

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

IOKit IOMemoryDescriptor* implicit cast.

◆ operator const::IOMemoryDescriptor *() [2/2]

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

IOKit IOMemoryDescriptor* implicit cast.

◆ operator const::IOMemoryMap *()

dxd::map< scope_t, dx::circular >::operator const::IOMemoryMap * ( ) const
inlineinherited

◆ operator dx::circular *()

dxd::map< scope_t, dx::circular >::operator dx::circular * ( ) const
inlineinherited

◆ operator uint64_t() [1/2]

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

IOKit physical address (only relevant for contigous memory).

◆ operator uint64_t() [2/2]

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

IOKit physical address (only relevant for contigous memory).

◆ operator->()

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

operator to use mapping like pointer

◆ operator::IOMemoryDescriptor *() [1/2]

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

◆ operator::IOMemoryDescriptor *() [2/2]

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

◆ operator::IOMemoryMap *()

dxd::map< scope_t, dx::circular >::operator::IOMemoryMap * ( )
inlineinherited

◆ operator::MDL *() [1/2]

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

◆ operator::MDL *() [2/2]

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

◆ pop() [1/2]

pop item from head

◆ pop() [2/2]

◆ print()

◆ push()

◆ release()

template<typename reference_t>
int dxd::referenced::release ( reference_t & reference)
inlineinherited

◆ retain()

void dxd::referenced::retain ( )
inlineinherited

◆ signal()

os_result dxd::broadcast::signal ( )
inlineinherited
Here is the call graph for this function:

◆ size() [1/3]

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

IOKit memory size.

◆ size() [2/3]

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

IOKit memory size.

◆ size() [3/3]

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

kernel mapping size

Here is the caller graph for this function:

◆ start()

virtual os_result dxd::stream::start ( bool force = false)
pure virtual

◆ stop()

virtual os_result dxd::stream::stop ( bool force = false)
pure virtual

Member Data Documentation

◆ _vm

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

kernel virtual address mapping

◆ iokit_memory_map

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

◆ references

atomic<int> dxd::referenced::references {}
inherited

◆ status [1/3]

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

IOKit memory status.

status of memory object

◆ status [2/3]

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

IOKit memory status.

status of memory object

◆ status [3/3]

os_result dxd::map< scope_t, dx::circular >::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

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.