Skip to content

Commit

Permalink
Rename the timer for sending sync messages.
Browse files Browse the repository at this point in the history
This patch renames the per-port timer in order to make room in the
namespace for a timer that detects a sync message input timeout.

Signed-off-by: Richard Cochran <[email protected]>
  • Loading branch information
richardcochran committed Aug 26, 2013
1 parent 7e69672 commit 329e4a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fd.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum {
FD_DELAY_TIMER,
FD_QUALIFICATION_TIMER,
FD_MANNO_TIMER,
FD_SYNC_TIMER,
FD_SYNC_TX_TIMER,
N_POLLFD,
};

Expand Down
16 changes: 8 additions & 8 deletions port.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,9 @@ static int port_set_qualification_tmo(struct port *p)
1+clock_steps_removed(p->clock), p->logAnnounceInterval);
}

static int port_set_sync_tmo(struct port *p)
static int port_set_sync_tx_tmo(struct port *p)
{
return set_tmo_log(p->fda.fd[FD_SYNC_TIMER], 1, p->logSyncInterval);
return set_tmo_log(p->fda.fd[FD_SYNC_TX_TIMER], 1, p->logSyncInterval);
}

static void port_show_transition(struct port *p,
Expand Down Expand Up @@ -1854,7 +1854,7 @@ static void port_e2e_transition(struct port *p, enum port_state next)
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
port_clr_tmo(p->fda.fd[FD_QUALIFICATION_TIMER]);
port_clr_tmo(p->fda.fd[FD_MANNO_TIMER]);
port_clr_tmo(p->fda.fd[FD_SYNC_TIMER]);
port_clr_tmo(p->fda.fd[FD_SYNC_TX_TIMER]);

switch (next) {
case PS_INITIALIZING:
Expand All @@ -1872,7 +1872,7 @@ static void port_e2e_transition(struct port *p, enum port_state next)
case PS_MASTER:
case PS_GRAND_MASTER:
port_set_manno_tmo(p);
port_set_sync_tmo(p);
port_set_sync_tx_tmo(p);
break;
case PS_PASSIVE:
port_set_announce_tmo(p);
Expand All @@ -1894,7 +1894,7 @@ static void port_p2p_transition(struct port *p, enum port_state next)
/* Leave FD_DELAY_TIMER running. */
port_clr_tmo(p->fda.fd[FD_QUALIFICATION_TIMER]);
port_clr_tmo(p->fda.fd[FD_MANNO_TIMER]);
port_clr_tmo(p->fda.fd[FD_SYNC_TIMER]);
port_clr_tmo(p->fda.fd[FD_SYNC_TX_TIMER]);

switch (next) {
case PS_INITIALIZING:
Expand All @@ -1912,7 +1912,7 @@ static void port_p2p_transition(struct port *p, enum port_state next)
case PS_MASTER:
case PS_GRAND_MASTER:
port_set_manno_tmo(p);
port_set_sync_tmo(p);
port_set_sync_tx_tmo(p);
break;
case PS_PASSIVE:
port_set_announce_tmo(p);
Expand Down Expand Up @@ -2011,9 +2011,9 @@ enum fsm_event port_event(struct port *p, int fd_index)
port_set_manno_tmo(p);
return port_tx_announce(p) ? EV_FAULT_DETECTED : EV_NONE;

case FD_SYNC_TIMER:
case FD_SYNC_TX_TIMER:
pr_debug("port %hu: master sync timeout", portnum(p));
port_set_sync_tmo(p);
port_set_sync_tx_tmo(p);
return port_tx_sync(p) ? EV_FAULT_DETECTED : EV_NONE;
}

Expand Down

0 comments on commit 329e4a2

Please sign in to comment.