L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Util::Dataspace_svr Class Reference

Dataspace server class. More...

#include <dataspace_svr>

+ Collaboration diagram for L4Re::Util::Dataspace_svr:

Public Member Functions

int map (Dataspace::Offset offset, Dataspace::Map_addr local_addr, Dataspace::Flags flags, Dataspace::Map_addr min_addr, Dataspace::Map_addr max_addr, L4::Ipc::Snd_fpage &memory)
 Map a region of the dataspace.
 
virtual int map_hook (Dataspace::Offset offs, Dataspace::Flags flags, Dataspace::Map_addr min, Dataspace::Map_addr max)
 A hook that is called as the first operation in each map request.
 
virtual void take () noexcept
 Take a reference to this dataspace.
 
virtual unsigned long release () noexcept
 Release a reference to this dataspace.
 
virtual long copy (l4_addr_t dst_offs, l4_umword_t src_id, l4_addr_t src_offs, unsigned long size) noexcept
 Copy from src dataspace to this destination dataspace.
 
virtual long clear (unsigned long offs, unsigned long size) const noexcept
 Clear a region in the dataspace.
 
virtual long allocate (l4_addr_t offset, l4_size_t size, unsigned access) noexcept
 Allocate a region within a dataspace.
 
virtual unsigned long page_shift () const noexcept
 Define the size of the flexpage to map.
 
virtual bool is_static () const noexcept
 Return whether the dataspace is static.
 

Detailed Description

Dataspace server class.

The default implementation of the interface provides a continuous dataspace with contiguous pages.

Definition at line 40 of file dataspace_svr.

Member Function Documentation

◆ allocate()

virtual long L4Re::Util::Dataspace_svr::allocate ( l4_addr_t  offset,
l4_size_t  size,
unsigned  access 
)
inlinevirtualnoexcept

Allocate a region within a dataspace.

Parameters
offsetOffset in the dataspace, in bytes.
sizeSize of the range, in bytes.
accessAccess mode with which the memory backing the dataspace region should be allocated.
Return values
0Success
<0Error

Definition at line 157 of file dataspace_svr.

References L4_ENODEV.

◆ clear()

virtual long L4Re::Util::Dataspace_svr::clear ( unsigned long  offs,
unsigned long  size 
) const
virtualnoexcept

Clear a region in the dataspace.

Parameters
offsStart of the region
sizeSize of the region
Return values
0Success
<0Error

◆ copy()

virtual long L4Re::Util::Dataspace_svr::copy ( l4_addr_t  dst_offs,
l4_umword_t  src_id,
l4_addr_t  src_offs,
unsigned long  size 
)
inlinevirtualnoexcept

Copy from src dataspace to this destination dataspace.

Parameters
dst_offsOffset into the destination dataspace
src_idLocal id of the source dataspace
src_offsOffset into the source dataspace
sizeNumber of bytes to copy
Return values
>=0Number of bytes copied
<0An error occured. The error code may depend on the implementation.

Definition at line 128 of file dataspace_svr.

References L4_ENODEV.

◆ is_static()

virtual bool L4Re::Util::Dataspace_svr::is_static ( ) const
inlinevirtualnoexcept

Return whether the dataspace is static.

Returns
True if dataspace is static

Definition at line 173 of file dataspace_svr.

◆ map()

int L4Re::Util::Dataspace_svr::map ( Dataspace::Offset  offset,
Dataspace::Map_addr  local_addr,
Dataspace::Flags  flags,
Dataspace::Map_addr  min_addr,
Dataspace::Map_addr  max_addr,
L4::Ipc::Snd_fpage memory 
)

Map a region of the dataspace.

Parameters
offsetOffset to start within data space
local_addrLocal address to map to.
flagsDataspace flags, see L4Re::Dataspace::F::Flags.
min_addrDefines start of receive window.
max_addrDefines end of receive window.
[out]memorySend fpage to map
Return values
0Success
<0Error

◆ map_hook()

virtual int L4Re::Util::Dataspace_svr::map_hook ( Dataspace::Offset  offs,
Dataspace::Flags  flags,
Dataspace::Map_addr  min,
Dataspace::Map_addr  max 
)
inlinevirtual

A hook that is called as the first operation in each map request.

Parameters
offsOffs param to map
flagsFlags param to map
minMin param to map
maxMax param to map
Return values
<0Error and the map request will be aborted with that error.
>=0Success
See also
map

Definition at line 89 of file dataspace_svr.

◆ page_shift()

virtual unsigned long L4Re::Util::Dataspace_svr::page_shift ( ) const
inlinevirtualnoexcept

Define the size of the flexpage to map.

Returns
flexpage size

Definition at line 165 of file dataspace_svr.

References L4_LOG2_PAGESIZE.

◆ release()

virtual unsigned long L4Re::Util::Dataspace_svr::release ( )
inlinevirtualnoexcept

Release a reference to this dataspace.

Returns
Number of references to the dataspace

Default does nothing and returns always zero.

Definition at line 113 of file dataspace_svr.

◆ take()

virtual void L4Re::Util::Dataspace_svr::take ( )
inlinevirtualnoexcept

Take a reference to this dataspace.

Default does nothing.

Definition at line 103 of file dataspace_svr.


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