Since we dropped the async flush_queue, we no longer need the refcnts to
be atomic.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4813>
void fd_ringbuffer_del(struct fd_ringbuffer *ring)
{
- if (!atomic_dec_and_test(&ring->refcnt))
+ if (--ring->refcnt > 0)
return;
ring->funcs->destroy(ring);
struct fd_ringbuffer *
fd_ringbuffer_ref(struct fd_ringbuffer *ring)
{
- p_atomic_inc(&ring->refcnt);
+ ring->refcnt++;
return ring;
}