-void sched_request_barrier(struct timeval *barrier, struct sched *s);
-void sched_request_barrier_or_min_delay(struct timeval *barrier, struct sched *s);
+int sched_request_barrier(struct timeval *barrier, struct sched *s);
+int sched_request_barrier_or_min_delay(struct timeval *barrier, struct sched *s);
+void sched_monitor_readfd(int fd, struct sched *s);
+void sched_monitor_writefd(int fd, struct sched *s);
+
+static inline bool sched_read_ok(int fd, const struct sched *s)
+{
+ return FD_ISSET(fd, &s->rfds);
+}
+
+static inline bool sched_write_ok(int fd, const struct sched *s)
+{
+ return FD_ISSET(fd, &s->wfds);
+}