#ifndef _POLLLOOP_H_ef453459_ #define _POLLLOOP_H_ef453459_ /* This file is in the public domain. */ typedef struct plctx PLCTX; #define RWTESTFN_ARGS \ int id __attribute__((__unused__)), \ void *arg __attribute__((__unused__)), \ PLCTX *ctx __attribute__((__unused__)) #define RWTESTFN_PROTO int, void *, PLCTX * #define RWFN_ARGS \ void *arg __attribute__((__unused__)), \ int id __attribute__((__unused__)) #define RWFN_PROTO void *, int #define BLOCKFN_ARGS \ void *arg __attribute__((__unused__)), \ PLCTX *ctx __attribute__((__unused__)) #define BLOCKFN_PROTO void *, PLCTX * extern void poll_init(void); extern int add_poll_fd( int, int (*)(RWTESTFN_PROTO), int (*)(RWTESTFN_PROTO), void (*)(RWFN_PROTO), void (*)(RWFN_PROTO), void * ); extern int add_block_fn(int (*)(BLOCKFN_PROTO), void *); extern void remove_poll_id(int); extern void remove_block_id(int); extern void pre_poll(void); extern int do_poll(void); extern void post_poll(void); extern void block_lower_timeout(PLCTX *, int); #define PL_NOID (-1) extern int rwtest_always(RWTESTFN_PROTO); extern int rwtest_never(RWTESTFN_PROTO); #endif