mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
os/trace_buffer.h: fix wraparound
If the buffer contains padding at the end, the iteration must continue in order to restart iteration from the start of the buffer. genodelabs/genode#4244
This commit is contained in:
parent
b31bbfe14c
commit
47cb44c6eb
@ -79,8 +79,14 @@ class Trace_buffer
|
||||
if (wrapped && entry.last()) {
|
||||
wrapped = false;
|
||||
entry = _buffer.first();
|
||||
if (entry.last())
|
||||
if (entry.last()) {
|
||||
new_curr = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!entry.length()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!functor(entry))
|
||||
|
Loading…
x
Reference in New Issue
Block a user