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).
This commit is contained in:
parent
9d3570325d
commit
a7576e2e4b
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user