/* Clear the fifo read and write pointers and set length to zero.  */
void fifo_clear(fifo_t *f)
/* Clear the fifo read and write pointers and set length to zero.  */
void fifo_clear(fifo_t *f)
{
  mutex_lock(f);
  f->rd_idx = f->wr_idx = f->count = 0;
  mutex_unlock(f);
}