- goto min_delay;
- if (ret == 0)
- return;
- if (!powd)
- goto min_delay;
- para_fd_set(powd->fd, &s->wfds, &s->max_fileno);
- return;
-min_delay:
- s->timeout.tv_sec = 0;
- 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;