Simplify argument to MGET(), to generate better code.
This commit is contained in:
parent
a6717054a4
commit
90b7cbc727
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: elink3.c,v 1.50 1998/11/18 18:34:52 thorpej Exp $ */
|
/* $NetBSD: elink3.c,v 1.51 1998/12/12 16:36:24 mycroft Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -1915,15 +1915,18 @@ epmbuffill(v)
|
||||||
void *v;
|
void *v;
|
||||||
{
|
{
|
||||||
struct ep_softc *sc = v;
|
struct ep_softc *sc = v;
|
||||||
|
struct mbuf *m;
|
||||||
int s, i;
|
int s, i;
|
||||||
|
|
||||||
s = splnet();
|
s = splnet();
|
||||||
i = sc->last_mb;
|
i = sc->last_mb;
|
||||||
do {
|
do {
|
||||||
if (sc->mb[i] == NULL)
|
if (sc->mb[i] == 0) {
|
||||||
MGET(sc->mb[i], M_DONTWAIT, MT_DATA);
|
MGET(m, M_DONTWAIT, MT_DATA);
|
||||||
if (sc->mb[i] == NULL)
|
if (m == 0)
|
||||||
break;
|
break;
|
||||||
|
sc->mb[i] = m;
|
||||||
|
}
|
||||||
i = (i + 1) % MAX_MBS;
|
i = (i + 1) % MAX_MBS;
|
||||||
} while (i != sc->next_mb);
|
} while (i != sc->next_mb);
|
||||||
sc->last_mb = i;
|
sc->last_mb = i;
|
||||||
|
|
Loading…
Reference in New Issue