LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
stream_cr_api.h File Reference

Composition Root helpers for the stream port. More...

Include dependency graph for stream_cr_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const stream_ops_tstream_default_ops (void)
 Return the default borrower-facing ops table for the stream port.
 
stream_env_t stream_default_env (const osal_mem_ops_t *mem_ops)
 Build a default stream_env_t from injected memory operations.
 

Detailed Description

This header exposes small CR-facing helpers used to build default public stream port wiring objects.

Note
This API belongs to the Composition Root surface. Runtime modules should not depend on it directly.

Definition in file stream_cr_api.h.

Function Documentation

◆ stream_default_env()

stream_env_t stream_default_env ( const osal_mem_ops_t mem_ops)
Parameters
[in]mem_opsMemory operations to expose through the returned environment.
Returns
A stream_env_t such that ret.mem == mem_ops.
Note
This helper does not allocate and performs no validation. It only packages the provided dependency into a public stream_env_t.

Definition at line 132 of file stream.c.

◆ stream_default_ops()

const stream_ops_t * stream_default_ops ( void  )

The returned table exposes the default public borrower operations of the stream port.

Returns
Non-NULL pointer to a well-formed stream_ops_t.
Postcondition
  • ret->read != NULL
  • ret->write != NULL
  • ret->flush != NULL

Definition at line 123 of file stream.c.