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

Comparing libeio/eio.c (file contents):
Revision 1.43 by root, Wed Jun 17 18:29:15 2009 UTC vs.
Revision 1.44 by root, Thu Nov 26 05:25:35 2009 UTC

196 196
197/*****************************************************************************/ 197/*****************************************************************************/
198 198
199#define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1) 199#define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1)
200 200
201/* calculcate time difference in ~1/EIO_TICKS of a second */ 201/* calculate time difference in ~1/EIO_TICKS of a second */
202static int tvdiff (struct timeval *tv1, struct timeval *tv2) 202static int tvdiff (struct timeval *tv1, struct timeval *tv2)
203{ 203{
204 return (tv2->tv_sec - tv1->tv_sec ) * EIO_TICKS 204 return (tv2->tv_sec - tv1->tv_sec ) * EIO_TICKS
205 + ((tv2->tv_usec - tv1->tv_usec) >> 10); 205 + ((tv2->tv_usec - tv1->tv_usec) >> 10);
206} 206}
598} 598}
599 599
600static void etp_set_max_poll_time (double nseconds) 600static void etp_set_max_poll_time (double nseconds)
601{ 601{
602 if (WORDACCESS_UNSAFE) X_LOCK (reslock); 602 if (WORDACCESS_UNSAFE) X_LOCK (reslock);
603 max_poll_time = nseconds; 603 max_poll_time = nseconds * EIO_TICKS;
604 if (WORDACCESS_UNSAFE) X_UNLOCK (reslock); 604 if (WORDACCESS_UNSAFE) X_UNLOCK (reslock);
605} 605}
606 606
607static void etp_set_max_poll_reqs (unsigned int maxreqs) 607static void etp_set_max_poll_reqs (unsigned int maxreqs)
608{ 608{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines