mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-06 09:21:49 +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()) {
|
if (wrapped && entry.last()) {
|
||||||
wrapped = false;
|
wrapped = false;
|
||||||
entry = _buffer.first();
|
entry = _buffer.first();
|
||||||
if (entry.last())
|
if (entry.last()) {
|
||||||
|
new_curr = entry;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!entry.length()) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!functor(entry))
|
if (!functor(entry))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user