|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Private exact-write engine for the POSIX stream adapter. More...
Go to the source code of this file.
Typedefs | |
| typedef int64_t(* | ra8_io_stream_posix_write_fn_t) (void *context, int fd, const uint8_t *bytes, uint32_t length, int *out_errno) |
| Injected descriptor-write primitive used by the exact-write loop. | |
Functions | |
| ra8_err_t | priv_ra8_io_stream_posix_write_loop (int fd, const uint8_t *bytes, uint32_t length, uint32_t *out_written, ra8_io_stream_posix_write_fn_t writer, void *writer_context) |
| Complete one descriptor write through an injected raw primitive. | |
Private exact-write engine for the POSIX stream adapter.
Declares the cross-translation-unit private write loop and its injected raw syscall shape. Production supplies write(2); focused tests supply bounded deterministic results without mutable global hooks.
Definition in file ra8_io_stream_posix_internal.h.
| typedef int64_t(* ra8_io_stream_posix_write_fn_t) (void *context, int fd, const uint8_t *bytes, uint32_t length, int *out_errno) |
Injected descriptor-write primitive used by the exact-write loop.
Definition at line 31 of file ra8_io_stream_posix_internal.h.
| ra8_err_t priv_ra8_io_stream_posix_write_loop | ( | int | fd, |
| const uint8_t * | bytes, | ||
| uint32_t | length, | ||
| uint32_t * | out_written, | ||
| ra8_io_stream_posix_write_fn_t | writer, | ||
| void * | writer_context ) |
Complete one descriptor write through an injected raw primitive.
Repeats interrupted attempts up to the fixed adapter ceiling, accumulates only proven progress, and rejects zero or over-reported successful writes.
| [in] | fd | Writable descriptor forwarded to writer. |
| [in] | bytes | Source bytes. |
| [in] | length | Requested byte count. |
| [out] | out_written | Bytes accepted before success or failure. |
| [in] | writer | Raw write primitive. |
| [in,out] | writer_context | Opaque context forwarded to writer. |
| k_ra8_ok | Exactly length bytes were accepted. |
| k_ra8_err_retry_limit | The bounded interruption ceiling was exceeded. |
| k_ra8_err_protocol_error | The writer reported impossible progress. |
bytes spans length readable bytes. out_written and writer are non-null. length accepted bytes. Definition at line 146 of file ra8_io_stream_posix.c.
References internal_write_loop_step(), k_ra8_err_null_ptr, k_ra8_ok, RA8_LOOP_BOUND, and RA8_PRIV.
Referenced by internal_posix_write().