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] - Blame information for rev 301

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
struct GTeth_desc
2
{
3
  unsigned ed_cmdsts;
4
};
5
struct GTeth_softc
6
{
7
  struct GTeth_desc txq_desc[32];
8
  unsigned int txq_fi;
9
  unsigned int txq_nactive;
10
};
11
 
12
void
13
GTeth_txq_free (struct GTeth_softc *sc)
14
{
15
  struct GTeth_desc *txd = &sc->txq_desc[0];
16
  txd->ed_cmdsts &= ~(1U << (31));
17
}
18
void
19
GTeth_txq_done (struct GTeth_softc *sc)
20
{
21
  while (sc->txq_nactive > 0)
22
    {
23
      volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_fi];
24
      if (txd->ed_cmdsts)
25
        {
26
          if (sc->txq_nactive == 1)
27
            return;
28
        }
29
      GTeth_txq_free (sc);
30
    }
31
}

powered by: WebSVN 2.1.0

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