/*
- * Copyright (C) 2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2009-2011 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
tv_add(&tv, now, &ppd->barrier);
}
if (tv_diff(&ppd->barrier, now, &diff) < 0)
- goto min_delay;
- if (tv_diff(&diff, &s->timeout, NULL) < 0)
- s->timeout = diff;
- return;
-min_delay:
- s->timeout.tv_sec = 0;
- s->timeout.tv_usec = 1;
+ return sched_min_delay(s);
+ sched_request_timeout(&diff, s);
}
static void prebuffer_close(struct filter_node *fn)
{
free(fn->private_data);
- free(fn->buf);
}
static void prebuffer_post_select(__a_unused struct sched *s, struct task *t)
if (iqs < conf->size_arg)
return;
btr_splice_out_node(btrn);
- prebuffer_close(fn);
t->error = -E_PREBUFFER_SUCCESS;
}
ppd->conf = fn->conf;
fn->private_data = ppd;
- fn->bufsize = 8192; /* gets increased on demand */
- fn->buf = para_malloc(fn->bufsize);
}
static void prebuffer_free_config(void *conf)