This code will be shared by future alternative algorithms.
Signed-off-by: Richard Cochran <[email protected]>
---
bmc.c | 7 +------
bmc.h | 11 +++++++++++
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/bmc.c b/bmc.c
index 4b435b2..3c3db82 100644
--- a/bmc.c
+++ b/bmc.c
@@ -21,12 +21,7 @@
#include "bmc.h"
#include "ds.h"
-#define A_BETTER_TOPO 2
-#define A_BETTER 1
-#define B_BETTER -1
-#define B_BETTER_TOPO -2
-
-static int dscmp2(struct dataset *a, struct dataset *b)
+int dscmp2(struct dataset *a, struct dataset *b)
{
int diff;
unsigned int A = a->stepsRemoved, B = b->stepsRemoved;
diff --git a/bmc.h b/bmc.h
index 23e7686..30fd443 100644
--- a/bmc.h
+++ b/bmc.h
@@ -24,6 +24,11 @@
#include "port.h"
#include "fsm.h"
+#define A_BETTER_TOPO 2
+#define A_BETTER 1
+#define B_BETTER -1
+#define B_BETTER_TOPO -2
+
/**
* BMC state decision algorithm.
* @param c The local clock.
@@ -44,4 +49,10 @@ enum port_state bmc_state_decision(struct clock *c, struct
port *r,
*/
int dscmp(struct dataset *a, struct dataset *b);
+/**
+ * Second part of the data set comparison algorithm, not for general
+ * public use.
+ */
+int dscmp2(struct dataset *a, struct dataset *b);
+
#endif
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel