ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_c6link_mdl_transfer_internal.h File Reference

Private commit-stage seam for the transactional media coordinator. More...

#include <stdint.h>
#include "ra8_attributes.h"
#include "ra8_c6link_mdl_transfer.h"
Include dependency graph for ra8_c6link_mdl_transfer_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ra8_err_t ra8_c6link_mdl_transfer_commit_test (const ra8_mdl_transfer_config_t *config, const ra8_mdl_chunk_t *chunk, uint64_t bytes_stored, uint32_t chunks_received, ra8_mdl_transfer_result_t *result)
 Run the terminal commit stage against a caller-supplied chunk.

Detailed Description

Private commit-stage seam for the transactional media coordinator.

Exposes the terminal verify/validate/publish stage to focused host tests so its metadata guard can be driven with terminal shapes the wire validator rejects upstream. Production sequencing, the pull budget, and every cleanup path stay private to ra8_c6link_mdl_transfer.c.

Definition in file ra8_c6link_mdl_transfer_internal.h.

Function Documentation

◆ ra8_c6link_mdl_transfer_commit_test()

ra8_err_t ra8_c6link_mdl_transfer_commit_test ( const ra8_mdl_transfer_config_t * config,
const ra8_mdl_chunk_t * chunk,
uint64_t bytes_stored,
uint32_t chunks_received,
ra8_mdl_transfer_result_t * result )

Run the terminal commit stage against a caller-supplied chunk.

Forwards every argument unchanged to the module-private production commit helper with an active storage transaction, so a focused test drives the exact shipped digest-comparison, artifact-validation, and publication sequence rather than a copy of it.

Parameters
[in]configComplete transfer configuration supplying storage and hash.
[in]chunkTerminal chunk whose metadata the stage must verify.
[in]bytes_storedDurable byte count the injected digest describes.
[in]chunks_receivedNumber of remote responses consumed.
[out]resultResult written only after commit succeeds.
Returns
Verification or commit status from the production helper.
Return values
k_ra8_okDigest matched and storage committed atomically.
k_ra8_err_invalid_sizeThe digest is absent or the counts disagree.
k_ra8_err_checksum_mismatchSHA-256 digests disagree.
k_ra8_failHash finalisation or storage commit failed.
Precondition
config, chunk, and result are non-null and caller-owned.
The injected hash stream has already consumed bytes_stored bytes.
Postcondition
Success fills result with the committed identity.
Failure leaves result unmodified by this stage.
Note
Test helper; not thread-safe because it finalises injected contexts.
MC/DC:
The only seam that can drive (!chunk->has_sha256) true. A COMPLETE response without the mandatory 32-byte digest is rejected by the chunk-semantics validator in ra8_c6link_mdl.c before ra8_c6link_mdl_transfer() ever sees it, so that operand of the terminal-metadata guard has no public-API vector.
Since
0.1.0

Definition at line 220 of file ra8_c6link_mdl_transfer.c.

References internal_mdl_transfer_commit().