ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/s_bsd_devpoll.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/s_bsd_devpoll.c (file contents):
Revision 5346 by michael, Sun Jan 11 12:41:14 2015 UTC vs.
Revision 6541 by michael, Wed Sep 16 11:01:18 2015 UTC

# Line 155 | Line 155 | comm_select(void)
155  
156    if (num < 0)
157    {
158 < #ifdef HAVE_USLEEP
159 <    usleep(50000);  /* avoid 99% CPU in comm_select */
160 < #endif
158 >    const struct timespec req = { .tv_sec = 0, .tv_nsec = 50000000 };
159 >    nanosleep(&req, NULL);  /* Avoid 99% CPU in comm_select */
160      return;
161    }
162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines