OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr31797.c] - Rev 297

Compare with Previous | Blame | View Log

struct GTeth_desc
{
  unsigned ed_cmdsts;
};
struct GTeth_softc
{
  struct GTeth_desc txq_desc[32];
  unsigned int txq_fi;
  unsigned int txq_nactive;
};
 
void
GTeth_txq_free (struct GTeth_softc *sc)
{
  struct GTeth_desc *txd = &sc->txq_desc[0];
  txd->ed_cmdsts &= ~(1U << (31));
}
void
GTeth_txq_done (struct GTeth_softc *sc)
{
  while (sc->txq_nactive > 0)
    {
      volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_fi];
      if (txd->ed_cmdsts)
	{
	  if (sc->txq_nactive == 1)
	    return;
	}
      GTeth_txq_free (sc);
    }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.