mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
sample: use 64bit integer
This commit is contained in:
parent
7c939ba1e5
commit
3cca02d1c0
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ static int drop_read(struct hook *h, struct sample *smps[], unsigned *cnt)
|
|||
cur = smps[i];
|
||||
|
||||
if (prev) {
|
||||
dist = cur->sequence - (int32_t) prev->sequence;
|
||||
dist = cur->sequence - (int64_t) prev->sequence;
|
||||
if (dist <= 0) {
|
||||
cur->flags |= SAMPLE_IS_REORDERED;
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ static int restart_read(struct hook *h, struct sample *smps[], unsigned *cnt)
|
|||
if (prev) {
|
||||
/* A wrap around of the sequence no should not be treated as a simulation restart */
|
||||
if (cur->sequence == 0 && prev->sequence <= (int) (UINT32_MAX - 128)) {
|
||||
warn("Simulation from node %s restarted (previous->seq=%" PRIu64 ", current->seq=%" PRIu64 ")",
|
||||
warn("Simulation from node %s restarted (previous->sequence=%" PRIu64 ", current->sequence=%" PRIu64 ")",
|
||||
node_name(h->node), prev->sequence, cur->sequence);
|
||||
|
||||
cur->flags |= SAMPLE_IS_FIRST;
|
||||
|
|
Loading…
Add table
Reference in a new issue