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

Comparing ircd-hybrid/trunk/src/s_bsd_kqueue.c (file contents):
Revision 6350 by michael, Tue Aug 11 17:53:44 2015 UTC vs.
Revision 6542 by michael, Wed Sep 16 11:01:51 2015 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)