Store graph callbacks in a structure
[lttv.git] / lttv / lttv / sync / data_structures.h
index 1f70ade4877a82ae782bfe4695d16d7375895683..014b7da105cc8172f836f42e3d21fac8ea49b437 100644 (file)
@@ -23,8 +23,6 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include <ltt/ltt.h>
-
 
 enum Direction
 {
@@ -88,6 +86,8 @@ typedef struct
 typedef struct _Event
 {
        unsigned long traceNum;
+       // wallTime is corrected according to factors in trace struct, cpuTime
+       // is not
        uint64_t cpuTime;
        WallTime wallTime;
 
@@ -100,6 +100,7 @@ typedef struct _Event
                UDPEvent* udpEvent;
        } event;
 
+       void (*copy)(const struct _Event* const event, struct _Event** const newEvent);
        void (*destroy)(struct _Event* const event);
 } Event;
 
@@ -114,11 +115,13 @@ typedef struct _Message
 typedef struct
 {
        Message* message;
+       // Event* acks[]
        GQueue* acks;
 } Exchange;
 
 typedef struct
 {
+       // Event* events[]
        GQueue* events;
 } Broadcast;
 
@@ -149,6 +152,9 @@ void gdnDestroyDatagramKey(gpointer data);
 
 // Event-related functions
 void gdnDestroyEvent(gpointer data);
+void copyEvent(const Event* const event, Event** const newEvent);
+void copyTCPEvent(const Event* const event, Event** const newEvent);
+void copyUDPEvent(const Event* const event, Event** const newEvent);
 void destroyEvent(Event* const event);
 void destroyTCPEvent(Event* const event);
 void destroyUDPEvent(Event* const event);
This page took 0.023322 seconds and 4 git commands to generate.