Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 79bcb3c

Browse files
committed
MtmGetCurrentStatus accessor
1 parent 4a7a7f4 commit 79bcb3c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

state.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,3 +622,16 @@ MtmRefereeClearWinner(void)
622622
PQfinish(conn);
623623
return true;
624624
}
625+
626+
/*
627+
* Mtm current status accessor.
628+
*/
629+
MtmNodeStatus
630+
MtmGetCurrentStatus()
631+
{
632+
volatile MtmNodeStatus status;
633+
MtmLock(LW_SHARED);
634+
status = Mtm->status;
635+
MtmUnlock();
636+
return status;
637+
}

state.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ extern void MtmReconnectNode(int nodeId);
3333
extern void MtmRefreshClusterStatus(void);
3434

3535
extern int countZeroBits(nodemask_t mask, int nNodes);
36+
37+
extern MtmNodeStatus MtmGetCurrentStatus(void);

0 commit comments

Comments
 (0)