tin  1.5.9
tsm::transport::shared_memory_channel< Slot, Capacity > Class Template Reference

#include <transport.h>

Collaboration diagram for tsm::transport::shared_memory_channel< Slot, Capacity >:
Collaboration graph

Classes

struct  readable_slot
 
struct  writable_slot
 

Public Member Functions

status try_acquire_write (writable_slot &out)
 
bool acquire_write (writable_slot &out)
 
status try_commit_write (writable_slot const &written)
 
bool commit_write (writable_slot const &written)
 
status try_acquire_read (readable_slot &out) const
 
bool acquire_read (readable_slot &out) const
 
status try_release_read (readable_slot const &read)
 
bool release_read (readable_slot const &read)
 
bool empty () const
 
bool full () const
 
std::size_t size () const
 

Detailed Description

template<typename Slot, std::size_t Capacity>
class tsm::transport::shared_memory_channel< Slot, Capacity >

Fixed-capacity shared-memory style slot channel.

This models the zero-copy lifecycle: writer acquires a slot, fills it, commits it, reader acquires the committed slot, consumes it, then releases it. The storage here is ordinary local memory so it can be used in tests and freestanding builds. Operating-system shared-memory mapping, cache maintenance, atomics, and interprocess synchronization are platform adapter responsibilities layered around this lifecycle.

Member Function Documentation

◆ acquire_read()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::acquire_read ( readable_slot out) const
inline

◆ acquire_write()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::acquire_write ( writable_slot out)
inline

◆ commit_write()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::commit_write ( writable_slot const &  written)
inline

◆ empty()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::empty ( ) const
inline

◆ full()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::full ( ) const
inline

◆ release_read()

template<typename Slot , std::size_t Capacity>
bool tsm::transport::shared_memory_channel< Slot, Capacity >::release_read ( readable_slot const &  read)
inline

◆ size()

template<typename Slot , std::size_t Capacity>
std::size_t tsm::transport::shared_memory_channel< Slot, Capacity >::size ( ) const
inline

◆ try_acquire_read()

template<typename Slot , std::size_t Capacity>
status tsm::transport::shared_memory_channel< Slot, Capacity >::try_acquire_read ( readable_slot out) const
inline

◆ try_acquire_write()

template<typename Slot , std::size_t Capacity>
status tsm::transport::shared_memory_channel< Slot, Capacity >::try_acquire_write ( writable_slot out)
inline

◆ try_commit_write()

template<typename Slot , std::size_t Capacity>
status tsm::transport::shared_memory_channel< Slot, Capacity >::try_commit_write ( writable_slot const &  written)
inline

◆ try_release_read()

template<typename Slot , std::size_t Capacity>
status tsm::transport::shared_memory_channel< Slot, Capacity >::try_release_read ( readable_slot const &  read)
inline

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