Avoid the name free so the MALLOCLOG option works again.

Fix some typos.
This commit is contained in:
augustss 1998-03-03 09:16:15 +00:00
parent 22dbd3c3da
commit 44c6ce78d2
3 changed files with 15 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.81 1998/01/12 08:44:08 thorpej Exp $ */ /* $NetBSD: audio.c,v 1.82 1998/03/03 09:16:15 augustss Exp $ */
/* /*
* Copyright (c) 1991-1993 Regents of the University of California. * Copyright (c) 1991-1993 Regents of the University of California.
@ -472,8 +472,8 @@ audio_alloc_ring(sc, r, bufsize)
if (hw->round_buffersize) if (hw->round_buffersize)
bufsize = hw->round_buffersize(hdl, bufsize); bufsize = hw->round_buffersize(hdl, bufsize);
r->bufsize = bufsize; r->bufsize = bufsize;
if (hw->alloc) if (hw->allocm)
r->start = hw->alloc(hdl, r->bufsize, M_DEVBUF, M_WAITOK); r->start = hw->allocm(hdl, r->bufsize, M_DEVBUF, M_WAITOK);
else else
r->start = malloc(bufsize, M_DEVBUF, M_WAITOK); r->start = malloc(bufsize, M_DEVBUF, M_WAITOK);
if (r->start == 0) if (r->start == 0)
@ -486,8 +486,8 @@ audio_free_ring(sc, r)
struct audio_softc *sc; struct audio_softc *sc;
struct audio_ringbuffer *r; struct audio_ringbuffer *r;
{ {
if (sc->hw_if->free) { if (sc->hw_if->freem) {
sc->hw_if->free(sc->hw_hdl, r->start, M_DEVBUF); sc->hw_if->freem(sc->hw_hdl, r->start, M_DEVBUF);
} else { } else {
free(r->start, M_DEVBUF); free(r->start, M_DEVBUF);
} }
@ -2807,7 +2807,8 @@ mixer_ioctl(dev, cmd, addr, flag, p)
mixer_remove(sc, p); /* remove old entry */ mixer_remove(sc, p); /* remove old entry */
if (*(int *)addr) { if (*(int *)addr) {
struct mixer_asyncs *ma; struct mixer_asyncs *ma;
ma = malloc(sizeof (struct mixer_asyncs), M_DEVBUF, M_WAITOK); ma = malloc(sizeof (struct mixer_asyncs),
M_DEVBUF, M_WAITOK);
ma->next = sc->sc_async_mixer; ma->next = sc->sc_async_mixer;
ma->proc = p; ma->proc = p;
sc->sc_async_mixer = ma; sc->sc_async_mixer = ma;

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */ /* $NetBSD: audio_if.h,v 1.25 1998/03/03 09:16:16 augustss Exp $ */
/* /*
* Copyright (c) 1994 Havard Eidnes. * Copyright (c) 1994 Havard Eidnes.
@ -107,8 +107,8 @@ struct audio_hw_if {
int (*query_devinfo)__P((void *, mixer_devinfo_t *)); int (*query_devinfo)__P((void *, mixer_devinfo_t *));
/* Allocate/free memory for the ring buffer. Usually malloc/free. */ /* Allocate/free memory for the ring buffer. Usually malloc/free. */
void *(*alloc)__P((void *, unsigned long, int, int)); void *(*allocm)__P((void *, unsigned long, int, int));
void (*free)__P((void *, void *, int)); void (*freem)__P((void *, void *, int));
unsigned long (*round_buffersize)__P((void *, unsigned long)); unsigned long (*round_buffersize)__P((void *, unsigned long));
int (*mappage)__P((void *, void *, int, int)); int (*mappage)__P((void *, void *, int, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: audiovar.h,v 1.17 1997/10/19 07:42:01 augustss Exp $ */ /* $NetBSD: audiovar.h,v 1.18 1998/03/03 09:16:16 augustss Exp $ */
/* /*
* Copyright (c) 1991-1993 Regents of the University of California. * Copyright (c) 1991-1993 Regents of the University of California.
@ -123,7 +123,7 @@ struct audio_softc {
struct audio_params sc_pparams; /* play encoding parameters */ struct audio_params sc_pparams; /* play encoding parameters */
struct audio_params sc_rparams; /* record encoding parameters */ struct audio_params sc_rparams; /* record encoding parameters */
int sc_eof; /* EOF, i.e. zero sixed write, counter */ int sc_eof; /* EOF, i.e. zero sized write, counter */
u_long sc_wstamp; u_long sc_wstamp;
u_long sc_playdrop; u_long sc_playdrop;
@ -133,13 +133,13 @@ struct audio_softc {
int sc_monitor_port; int sc_monitor_port;
#ifdef AUDIO_INTR_TIME #ifdef AUDIO_INTR_TIME
u_long sc_pfirstintr; /* first time we saw a xmit interrupt */ u_long sc_pfirstintr; /* first time we saw a play interrupt */
int sc_pnintr; /* number of interrupts */ int sc_pnintr; /* number of interrupts */
u_long sc_plastintr; /* last time we saw a xmit interrupt */ u_long sc_plastintr; /* last time we saw a play interrupt */
long sc_pblktime; /* nominal time between interrupts */ long sc_pblktime; /* nominal time between interrupts */
u_long sc_rfirstintr; /* first time we saw a rec interrupt */ u_long sc_rfirstintr; /* first time we saw a rec interrupt */
int sc_rnintr; /* number of interrupts */ int sc_rnintr; /* number of interrupts */
u_long sc_rlastintr; /* last time we saw a xrec interrupt */ u_long sc_rlastintr; /* last time we saw a rec interrupt */
long sc_rblktime; /* nominal time between interrupts */ long sc_rblktime; /* nominal time between interrupts */
#endif #endif
}; };