mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
Mark packet-stream descriptor head/tail as volatile
`volatile` effectively prevents instruction reordering by the compiler and fixes an issue with -O3 compiled components. Note, this commit does not address further arguments regarding memory barriers and volatile voiced in issue #693. Issue #693
This commit is contained in:
@@ -168,8 +168,8 @@ class Genode::Packet_descriptor_queue
|
||||
*/
|
||||
struct
|
||||
{
|
||||
unsigned _head;
|
||||
unsigned _tail;
|
||||
unsigned volatile _head;
|
||||
unsigned volatile _tail;
|
||||
PACKET_DESCRIPTOR _queue[QUEUE_SIZE];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user