summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authororion <orion@FreeBSD.org>2003-03-05 14:48:28 +0000
committerorion <orion@FreeBSD.org>2003-03-05 14:48:28 +0000
commitfd018b2fba2125e438fef94277c85b091d75b1e9 (patch)
treedd97bbd94e389464a15271a18a1edd791a724f92 /sys
parentca36cee9d879e68a864f07f8a6d26f9d9b0a29a1 (diff)
downloadFreeBSD-src-fd018b2fba2125e438fef94277c85b091d75b1e9.zip
FreeBSD-src-fd018b2fba2125e438fef94277c85b091d75b1e9.tar.gz
Back out last commit, which is fine in theory, but ignores the fact
that a lock is held whilst the allocations are made (M_WAITOK -> M_NOWAIT).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/feeder.c6
-rw-r--r--sys/dev/sound/pcm/feeder_fmt.c6
-rw-r--r--sys/dev/sound/pcm/feeder_rate.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 8519574..0c2f784 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -59,7 +59,7 @@ feeder_register(void *p)
KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name));
SLIST_INIT(&feedertab);
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for root feeder: %s\n",
fc->name);
@@ -84,7 +84,7 @@ feeder_register(void *p)
i = 0;
while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) {
/* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_NOWAIT | M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out);
@@ -137,7 +137,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc)
struct pcm_feeder *f;
int err;
- f = (struct pcm_feeder *)kobj_create((kobj_class_t)fc, M_FEEDER, M_WAITOK | M_ZERO);
+ f = (struct pcm_feeder *)kobj_create((kobj_class_t)fc, M_FEEDER, M_NOWAIT | M_ZERO);
if (f == NULL)
return NULL;
diff --git a/sys/dev/sound/pcm/feeder_fmt.c b/sys/dev/sound/pcm/feeder_fmt.c
index 72de901..9306af2 100644
--- a/sys/dev/sound/pcm/feeder_fmt.c
+++ b/sys/dev/sound/pcm/feeder_fmt.c
@@ -209,7 +209,7 @@ FEEDER_DECLARE(feeder_8to16le, 0, NULL);
static int
feed_16to8_init(struct pcm_feeder *f)
{
- f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO);
+ f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO);
return 0;
}
@@ -318,7 +318,7 @@ FEEDER_DECLARE(feeder_monotostereo16, 0, NULL);
static int
feed_stereotomono8_init(struct pcm_feeder *f)
{
- f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO);
+ f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO);
return 0;
}
@@ -363,7 +363,7 @@ FEEDER_DECLARE(feeder_stereotomono8, 1, NULL);
static int
feed_stereotomono16_init(struct pcm_feeder *f)
{
- f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_WAITOK | M_ZERO);
+ f->data = malloc(FEEDBUFSZ, M_FMTFEEDER, M_NOWAIT | M_ZERO);
return 0;
}
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
index 4dfff2e..540ff97 100644
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -249,7 +249,7 @@ feed_rate_init(struct pcm_feeder *f)
{
struct feed_rate_info *info;
- info = malloc(sizeof(*info), M_RATEFEEDER, M_WAITOK | M_ZERO);
+ info = malloc(sizeof(*info), M_RATEFEEDER, M_NOWAIT | M_ZERO);
info->src = DSP_DEFAULT_SPEED;
info->dst = DSP_DEFAULT_SPEED;
info->channels = 2;
OpenPOWER on IntegriCloud