??? 01/08/07 16:17 Read: times |
#130434 - ring buffer, atomicity and C Responding to: ???'s previous message |
C does allow a simple construct for ring buffers without any atomicity issues
char fetch; char store; in the ISR buffer[store] = SBUF; store++; store &= (Bufffer_sixe - 1) in the main if (fetch != store) { ......... Erik |