We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d23006e commit a06fe58Copy full SHA for a06fe58
components/drivers/include/ipc/ringbuffer.h
@@ -41,10 +41,10 @@ struct rt_ringbuffer
41
* read_idx-^ ^-write_idx
42
*/
43
44
- rt_uint32_t read_mirror : 1;
45
- rt_uint32_t read_index : 31;
46
- rt_uint32_t write_mirror : 1;
47
- rt_uint32_t write_index : 31;
+ volatile rt_uint32_t read_mirror : 1;
+ volatile rt_uint32_t read_index : 31;
+ volatile rt_uint32_t write_mirror : 1;
+ volatile rt_uint32_t write_index : 31;
48
/* as we use msb of index as mirror bit, the size should be signed and
49
* could only be positive. */
50
rt_int32_t buffer_size;
0 commit comments