Calculate synchronization accuracy within the chull module
[lttv.git] / lttv / lttv / sync / data_structures.h
index cc422a81261efe105861e68855bd980aca010aa7..627286cc77ac4656b23dda6f0012bdd5dc4f6041 100644 (file)
@@ -22,6 +22,8 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
 
 enum Direction
 {
@@ -160,8 +162,8 @@ typedef enum
         * even no communication at all). approx and accuracy are NULL.
         */
 
-       SCREWED,
-       /* The algorithms are screwed. All fields may be NULL.
+       FAIL,
+       /* The algorithms are defective. All fields may be NULL.
         */
 
        APPROX_NB, // This must be the last member
@@ -179,11 +181,18 @@ typedef struct
 typedef struct
 {
        unsigned int refCount;
-       unsigned int traceNb;
        PairFactors** pairFactors;
 } AllFactors;
 
 
+// This structure is used to return a corrected time value with accuracy
+// bounds
+typedef struct
+{
+       uint64_t time, min, max;
+} CorrectedTime;
+
+
 // ConnectionKey-related functions
 guint ghfConnectionKeyHash(gconstpointer key);
 
@@ -236,6 +245,6 @@ void destroyBroadcast(Broadcast* const broadcast);
 void destroyPairFactors(PairFactors* factorsCHull);
 
 AllFactors* createAllFactors(const unsigned int traceNb);
-void freeAllFactors(AllFactors* const allFactors);
+void freeAllFactors(AllFactors* const allFactors, const unsigned int traceNb);
 
 #endif
This page took 0.02701 seconds and 4 git commands to generate.