summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/feeder.c
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/dev/sound/pcm/feeder.c
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/dev/sound/pcm/feeder.c')
-rw-r--r--sys/dev/sound/pcm/feeder.c6
1 files changed, 3 insertions, 3 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;
OpenPOWER on IntegriCloud