in core.c [953:972]
int channel_has_mbo(struct most_interface *iface, int id,
struct most_component *comp)
{
struct most_channel *c = iface->p->channel[id];
unsigned long flags;
int empty;
if (unlikely(!c))
return -EINVAL;
if (c->pipe0.refs && c->pipe1.refs &&
((comp == c->pipe0.comp && c->pipe0.num_buffers <= 0) ||
(comp == c->pipe1.comp && c->pipe1.num_buffers <= 0)))
return 0;
spin_lock_irqsave(&c->fifo_lock, flags);
empty = list_empty(&c->fifo);
spin_unlock_irqrestore(&c->fifo_lock, flags);
return !empty;
}