From: Andre Noll Date: Wed, 13 Jan 2010 21:01:55 +0000 (+0100) Subject: oss: Kill non-btr code. X-Git-Tag: v0.4.2~110 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=df0b105444be76e6bcb1f54987824f7f4f6f13a5;p=paraslash.git oss: Kill non-btr code. --- diff --git a/oss_write.c b/oss_write.c index c1717eb8..f64603cc 100644 --- a/oss_write.c +++ b/oss_write.c @@ -46,17 +46,6 @@ struct private_oss_write_data { int bytes_per_frame; }; -static int oss_pre_select(struct sched *s, struct writer_node *wn) -{ - struct private_oss_write_data *powd = wn->private_data; - struct writer_node_group *wng = wn->wng; - - if (*wng->loaded - wn->written < powd->bytes_per_frame) - return 0; - para_fd_set(powd->fd, &s->wfds, &s->max_fileno); - return 1; -} - static void oss_pre_select_btr(struct sched *s, struct task *t) { struct writer_node *wn = container_of(t, struct writer_node, task); @@ -77,31 +66,6 @@ min_delay: s->timeout.tv_usec = 1; } -static int oss_post_select(struct sched *s, struct writer_node *wn) -{ - int ret; - struct private_oss_write_data *powd = wn->private_data; - struct writer_node_group *wng = wn->wng; - size_t frames, bytes = *wng->loaded - wn->written; - char *data = *wng->bufp + wn->written; - - if (*wng->input_error < 0 && bytes < powd->bytes_per_frame) { - wn->written = *wng->loaded; - return *wng->input_error; - } - frames = bytes / powd->bytes_per_frame; - if (!frames) /* less than a single frame available */ - goto out; - if (!FD_ISSET(powd->fd, &s->wfds)) - goto out; - ret = write_nonblock(powd->fd, data, frames * powd->bytes_per_frame, 0); - if (ret < 0) - return ret; - wn->written += ret; -out: - return 1; -} - static void oss_close(struct writer_node *wn) { struct private_oss_write_data *powd = wn->private_data; @@ -303,9 +267,7 @@ void oss_write_init(struct writer *w) oss_cmdline_parser_init(&dummy); w->open = oss_open; w->close = oss_close; - w->pre_select = oss_pre_select; w->pre_select_btr = oss_pre_select_btr; - w->post_select = oss_post_select; w->post_select_btr = oss_post_select_btr; w->parse_config = oss_parse_config; w->free_config = oss_free_config;