Messages in this thread | | | From | David Laight <> | Subject | RE: [RFC] WRITE_ONCE_INC() and friends | Date | Sun, 19 Apr 2020 18:02:50 +0000 |
| |
From: Petko Manolov > Sent: 19 April 2020 10:45 > Recently I started reading up on KCSAN and at some point I ran into stuff like: > > WRITE_ONCE(ssp->srcu_lock_nesting[idx], ssp->srcu_lock_nesting[idx] + 1); > WRITE_ONCE(p->mm->numa_scan_seq, READ_ONCE(p->mm->numa_scan_seq) + 1);
If all the accesses use READ/WRITE_ONCE() why not just mark the structure field 'volatile'?
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |