Correctly report buffer status.
This commit is contained in:
parent
39a1493bcd
commit
6bb58a2cd1
@ -322,7 +322,7 @@ int iso_ring_buffer_get_status(struct burn_source *b, size_t *size,
|
|||||||
*free_bytes = buf->cap - buf->size;
|
*free_bytes = buf->cap - buf->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = (buf->rend + 1) + (buf->wend ? 4 : 0);
|
ret = (buf->rend ? 4 : 0) + (buf->wend + 1);
|
||||||
|
|
||||||
pthread_mutex_unlock(&buf->mutex);
|
pthread_mutex_unlock(&buf->mutex);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user