Commit fc40c5fc authored by Andreas Schmidt's avatar Andreas Schmidt

Ensure timestamping does not cause segfault.

parent e314534f
...@@ -156,9 +156,9 @@ extern void PrrtTimestampTableUse(PrrtTimestampTable *); ...@@ -156,9 +156,9 @@ extern void PrrtTimestampTableUse(PrrtTimestampTable *);
PrrtTimestampPlaceholder *__ph = (ph); \ PrrtTimestampPlaceholder *__ph = (ph); \
PrrtTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \ PrrtTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \
for (unsigned int __t = 0; __t < ts_count; __t++) { \ for (unsigned int __t = 0; __t < ts_count; __t++) { \
__ts->rows[seqno].time[__t].actual.t.tv_sec += __ph->rows[0].time[__t].actual.t.tv_sec; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_sec += __ph->rows[0].time[__t].actual.t.tv_sec; \
__ts->rows[seqno].time[__t].actual.t.tv_nsec += __ph->rows[0].time[__t].actual.t.tv_nsec; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_nsec += __ph->rows[0].time[__t].actual.t.tv_nsec; \
__ts->rows[seqno].time[__t].actual.c += __ph->rows[0].time[__t].actual.c; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.c += __ph->rows[0].time[__t].actual.c; \
} \ } \
} while (0) } while (0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment