… | |
… | |
200 | /*****************************************************************************/ |
200 | /*****************************************************************************/ |
201 | |
201 | |
202 | #define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1) |
202 | #define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1) |
203 | |
203 | |
204 | /* calculate time difference in ~1/EIO_TICKS of a second */ |
204 | /* calculate time difference in ~1/EIO_TICKS of a second */ |
205 | ECB_INLINE int |
205 | ecb_inline int |
206 | tvdiff (struct timeval *tv1, struct timeval *tv2) |
206 | tvdiff (struct timeval *tv1, struct timeval *tv2) |
207 | { |
207 | { |
208 | return (tv2->tv_sec - tv1->tv_sec ) * EIO_TICKS |
208 | return (tv2->tv_sec - tv1->tv_sec ) * EIO_TICKS |
209 | + ((tv2->tv_usec - tv1->tv_usec) >> 10); |
209 | + ((tv2->tv_usec - tv1->tv_usec) >> 10); |
210 | } |
210 | } |
… | |
… | |
1695 | eio_init (void (*want_poll)(void), void (*done_poll)(void)) |
1695 | eio_init (void (*want_poll)(void), void (*done_poll)(void)) |
1696 | { |
1696 | { |
1697 | return etp_init (want_poll, done_poll); |
1697 | return etp_init (want_poll, done_poll); |
1698 | } |
1698 | } |
1699 | |
1699 | |
1700 | ECB_INLINE void |
1700 | ecb_inline void |
1701 | eio_api_destroy (eio_req *req) |
1701 | eio_api_destroy (eio_req *req) |
1702 | { |
1702 | { |
1703 | free (req); |
1703 | free (req); |
1704 | } |
1704 | } |
1705 | |
1705 | |