MBarrier Object (64-bit, in shared memory)
pending_count
arrivals left
expected_count
total expected
phase
Current phase (0 or 1). Flips automatically on completion.
pending_count
Remaining arrivals needed before phase completes.
expected_count
Total arrivals expected per phase (set by init).
tx-count
Pending async bytes. Increased by arrive.expect_tx, decreased by HW on transfer completion.
Phase Completion Condition
pending_count == 0
&&
tx-count ≤ 0
A phase completes when all expected threads have arrived AND all expected async bytes have been transferred.
Upon completion, the barrier auto-resets: phase flips, pending_count resets to expected_count, tx-count resets to 0.