X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=sched.h;h=d9e852447ec55c27e4fc77a86185fcaa4a68bd06;hb=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed;hp=4695da05040d1934e0c23a12db9bb14c7e9f799c;hpb=fdd8a22e1df57a8c9254e7d0074301e7dde2c557;p=paraslash.git diff --git a/sched.h b/sched.h index 4695da05..d9e85244 100644 --- a/sched.h +++ b/sched.h @@ -80,3 +80,15 @@ void sched_request_timeout(struct timeval *to, struct sched *s); void sched_request_timeout_ms(long unsigned ms, 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); +}