News for hackers. Stuff that matters.
Re:UART Receive Buffering by cnvogel on Friday June 12, 2015 @05:12AM (#9704766)
Also the update of the write pointer could be reordered to occur before storage of the actual data flushed to the buffer.

      e.g.
      buf[volatile_write_ptr] = c
      volatile_write_ptr++;
might occur the other way 'round for the code that is reading from buf[].

For typical "simple" single processor controllers this will not be an issue, though, and "volatile"+spinlocks/disenable-enable-interrupts will work just fine.

There are no comments on this comment yet.