mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
cib: check (write > read) explicitly
This commit is contained in:
parent
b5050539a2
commit
e7b86361e2
@ -79,9 +79,7 @@ static inline unsigned int cib_avail(cib_t *__restrict cib)
|
||||
*/
|
||||
static inline int cib_get(cib_t *__restrict cib)
|
||||
{
|
||||
unsigned int avail = cib_avail(cib);
|
||||
|
||||
if (avail > 0) {
|
||||
if (cib->write_count > cib->read_count) {
|
||||
return (int) (cib->read_count++ & cib->mask);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user