static void sfr_be_start (RemWriter_t *rwp) { ctrc_printd (RTPS_ID, RTPS_SFR_BE_START, &rwp, sizeof (rwp)); prof_start (rtps_br_start); RW_SIGNAL (rwp, "BE-Start"); #ifdef RTPS_MARKERS if (rwp->rw_reader->endpoint.mark_start) rtps_marker_notify (rwp->rw_reader->endpoint.endpoint, EM_START, "sfr_be_start"); #endif NEW_RW_CSTATE (rwp, RWCS_INITIAL, 1); LIST_INIT (rwp->rr_changes); rwp->rw_changes.nchanges = 0; NEW_RW_CSTATE (rwp, RWCS_READY, 0); NEW_RW_ASTATE (rwp, RWAS_WAITING, 1); prof_stop (rtps_br_start, 1); }
static void sfr_rel_start (RemWriter_t *rwp) { Reader_t *r = (Reader_t *) (rwp->rw_reader->endpoint.endpoint); ctrc_printd (RTPS_ID, RTPS_SFR_REL_START, &rwp, sizeof (rwp)); prof_start (rtps_rr_start); RW_SIGNAL (rwp, "REL-Start"); #ifdef RTPS_MARKERS if (rwp->rw_reader->endpoint.mark_start) rtps_marker_notify (rwp->rw_reader->endpoint.endpoint, EM_START, "sfr_rel_start"); #endif NEW_RW_CSTATE (rwp, RWCS_INITIAL, 1); LIST_INIT (rwp->rw_changes); rwp->rw_changes.nchanges = 0; NEW_RW_CSTATE (rwp, RWCS_READY, 0); NEW_RW_ASTATE (rwp, RWAS_WAITING, 0); rwp->rw_hb_no_data = 0; rwp->rw_hbrsp_timer = NULL; #ifdef RTPS_PROXY_INST rwp->rw_loc_inst = ++rtps_rw_insts; #endif #ifdef RTPS_INIT_ACKNACK /* Send an initial ACKNACK to bootstrap the protocol in case the writer was already active, but we missed the initial HEARTBEAT! */ rwp->rw_peer_alive = 0; sfr_rel_init_acknack (rwp); RALIVE_TMR_ALLOC (rwp); rwp->rw_hbrsp_timer = tmr_alloc (); if (rwp->rw_hbrsp_timer) { tmr_init (rwp->rw_hbrsp_timer, "RTPS-RAlive"); RALIVE_TMR_START (rwp, rwp->rw_hbrsp_timer, RALIVE_TO, (uintptr_t) rwp, sfr_rel_alive_to, &r->r_lock); } #endif prof_stop (rtps_rr_start, 1); }
static void sfr_be_finish (RemWriter_t *rwp) { ctrc_printd (RTPS_ID, RTPS_SFR_BE_FINISH, &rwp, sizeof (rwp)); prof_start (rtps_br_finish); RW_SIGNAL (rwp, "BE-Finish"); #ifdef RTPS_MARKERS if (rwp->rw_reader->endpoint.mark_finish) rtps_marker_notify (rwp->rw_reader->endpoint.endpoint, EM_FINISH, "sfr_be_finish"); #endif /* We're done. */ NEW_RW_CSTATE (rwp, RWCS_FINAL, 0); prof_stop (rtps_br_finish, 1); }