Closed Tachiorz closed 7 years ago
I'm not sure, but isn't incrementing buffer_head and buffer_tail a bit unsafe, taking into account that they’re accessed from different threads? https://github.com/ali1234/raspi-teletext/blob/6858705ba9da7d8917a22e52eb5e47452cc4bb18/buffer.c#L65 https://github.com/ali1234/raspi-teletext/blob/6858705ba9da7d8917a22e52eb5e47452cc4bb18/buffer.c#L86
buffer_head
buffer_tail
No, because they are uint8_t and therefore guaranteed to be atomic.
I'm not sure, but isn't incrementing
buffer_head
andbuffer_tail
a bit unsafe, taking into account that they’re accessed from different threads? https://github.com/ali1234/raspi-teletext/blob/6858705ba9da7d8917a22e52eb5e47452cc4bb18/buffer.c#L65 https://github.com/ali1234/raspi-teletext/blob/6858705ba9da7d8917a22e52eb5e47452cc4bb18/buffer.c#L86