- sit->check_fd = 1;
- para_fd_set(STDIN_FILENO, &s->rfds, &s->max_fileno);
-}
-
-#define STDIN_MAX_PENDING (100 * 1024)
-
-static void stdin_pre_select_btr(struct sched *s, struct task *t)
-{
- struct stdin_task *sit = container_of(t, struct stdin_task, task);
-
- t->error = 0;
- if (btr_bytes_pending(sit->btrn) > STDIN_MAX_PENDING)
- sit->check_fd = 0;
- else {
- sit->check_fd = 1;
- para_fd_set(STDIN_FILENO, &s->rfds, &s->max_fileno);
- }
+ if (btr_pool_unused(sit->btrp) > 0)
+ return para_fd_set(STDIN_FILENO, &s->rfds, &s->max_fileno);
+ sched_request_timeout_ms(100, s);