ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.c
(Generate patch)

Comparing libeio/eio.c (file contents):
Revision 1.72 by root, Fri Jun 10 12:45:20 2011 UTC vs.
Revision 1.73 by root, Fri Jun 17 18:55:42 2011 UTC

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 */
205ECB_INLINE int 205ecb_inline int
206tvdiff (struct timeval *tv1, struct timeval *tv2) 206tvdiff (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}
1695eio_init (void (*want_poll)(void), void (*done_poll)(void)) 1695eio_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
1700ECB_INLINE void 1700ecb_inline void
1701eio_api_destroy (eio_req *req) 1701eio_api_destroy (eio_req *req)
1702{ 1702{
1703 free (req); 1703 free (req);
1704} 1704}
1705 1705

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines