summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/midi
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/dev/sound/midi
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/dev/sound/midi')
-rw-r--r--sys/dev/sound/midi/midi.c6
-rw-r--r--sys/dev/sound/midi/midibuf.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c6
-rw-r--r--sys/dev/sound/midi/timer.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 6e2de52..07d2660 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -282,7 +282,7 @@ create_mididev_info_unit(int type, mididev_info *mdinf, synthdev_info *syninf)
}
/* As malloc(9) might block, allocate mididev_info now. */
- mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_ZERO);
+ mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_WAITOK | M_ZERO);
if (mdnew == NULL)
return NULL;
bcopy(mdinf, mdnew, sizeof(mididev_info));
@@ -607,7 +607,7 @@ midi_read(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -659,7 +659,7 @@ midi_write(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenw = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c
index 41ea4dd..8b4eda7 100644
--- a/sys/dev/sound/midi/midibuf.c
+++ b/sys/dev/sound/midi/midibuf.c
@@ -55,7 +55,7 @@ int
midibuf_init(midi_dbuf *dbuf)
{
if (dbuf->buf == NULL) {
- dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_ZERO);
+ dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_WAITOK | M_ZERO);
cv_init(&dbuf->cv_in, "midi queue in");
cv_init(&dbuf->cv_out, "midi queue out");
}
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 7d0b6e2..5115cc9 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -322,7 +322,7 @@ seq_initunit(int unit)
dev_t seqdev, musicdev;
/* Allocate the softc. */
- scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
if (scp == (sc_p)NULL) {
printf("seq_initunit: unit %d, softc allocation failed.\n", unit);
return (1);
@@ -544,7 +544,7 @@ seq_read(dev_t i_dev, struct uio *buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -2364,7 +2364,7 @@ create_seqdev_info_unit(int unit, seqdev_info *seq)
seqdev_info *sd, *sdnew;
/* As malloc(9) might block, allocate seqdev_info now. */
- sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_ZERO);
+ sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
if (sdnew == NULL)
return NULL;
bcopy(seq, sdnew, sizeof(seqdev_info));
diff --git a/sys/dev/sound/midi/timer.c b/sys/dev/sound/midi/timer.c
index b5c75cf..ba4bce0 100644
--- a/sys/dev/sound/midi/timer.c
+++ b/sys/dev/sound/midi/timer.c
@@ -97,7 +97,7 @@ timerdev_install(void)
tmd = NULL;
scp = NULL;
- scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
if (scp == NULL) {
ret = ENOMEM;
goto fail;
@@ -146,7 +146,7 @@ create_timerdev_info_unit(timerdev_info *tmdinf)
}
/* As malloc(9) might block, allocate timerdev_info now. */
- tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_ZERO);
+ tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
if (tmdnew == NULL)
return NULL;
bcopy(tmdinf, tmdnew, sizeof(timerdev_info));
OpenPOWER on IntegriCloud