X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=lttv%2Flttv%2Fsync%2Fdata_structures.h;h=627286cc77ac4656b23dda6f0012bdd5dc4f6041;hb=4ed007496f46d0b4f8bfc1d827e2a613a2d0d15c;hp=cc422a81261efe105861e68855bd980aca010aa7;hpb=0a87ec9a018cc9731ce3b04309eaa4dcc77df6d2;p=lttv.git diff --git a/lttv/lttv/sync/data_structures.h b/lttv/lttv/sync/data_structures.h index cc422a81..627286cc 100644 --- a/lttv/lttv/sync/data_structures.h +++ b/lttv/lttv/sync/data_structures.h @@ -22,6 +22,8 @@ #include #include +#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