mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-10 19:31:48 +00:00
trace: C++20 compatibility
With the new standard, volatile variables cannot be incremented, decremented, or modified by compound assignments (e.g., +=). Issue #4869
This commit is contained in:
parent
1dac048413
commit
f679864c23
@ -185,7 +185,7 @@ class Genode::Trace::Simple_buffer
|
|||||||
* the new head
|
* the new head
|
||||||
*/
|
*/
|
||||||
size_t *old_head_len = &_head_entry()->len;
|
size_t *old_head_len = &_head_entry()->len;
|
||||||
_num_entries++;
|
_num_entries = _num_entries + 1;
|
||||||
|
|
||||||
/* advance head offset, wrap when next entry does not fit into buffer */
|
/* advance head offset, wrap when next entry does not fit into buffer */
|
||||||
_head_offset += sizeof(_Entry) + len;
|
_head_offset += sizeof(_Entry) + len;
|
||||||
|
@ -145,7 +145,7 @@ class Genode::Trace::Control
|
|||||||
|
|
||||||
void trace()
|
void trace()
|
||||||
{
|
{
|
||||||
_policy_version++;
|
_policy_version = _policy_version + 1;
|
||||||
enable();
|
enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ Trace::Simple_buffer &Trace::Partitioned_buffer::_switch_producer()
|
|||||||
* consumer may still switch partitions at this point but not continue
|
* consumer may still switch partitions at this point but not continue
|
||||||
* reading until we set the new head entry
|
* reading until we set the new head entry
|
||||||
*/
|
*/
|
||||||
_lost_entries += _producer()._num_entries;
|
_lost_entries = _lost_entries + _producer()._num_entries;
|
||||||
switched = true;
|
switched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ Trace::Simple_buffer &Trace::Partitioned_buffer::_switch_producer()
|
|||||||
|
|
||||||
/* XXX _wrapped only needed for testing */
|
/* XXX _wrapped only needed for testing */
|
||||||
if (State::Producer::get(_state) == PRIMARY)
|
if (State::Producer::get(_state) == PRIMARY)
|
||||||
_wrapped++;
|
_wrapped = _wrapped + 1;
|
||||||
|
|
||||||
Genode::memory_barrier();
|
Genode::memory_barrier();
|
||||||
_consumer_lock = SPINLOCK_UNLOCKED;
|
_consumer_lock = SPINLOCK_UNLOCKED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user