1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#define ERING_SIZE 16 #define ERING_MASK (ERING_SIZE -1) typedef struct { uint64_t ptp; uint32_t when; uint32_t value; } Event; typedef struct { Event events[ERING_SIZE]; uint32_t rx_ptr, tx_ptr; } Event_ring;