From: Howard Chu Date: Fri, 21 Jan 2005 00:04:05 +0000 (+0000) Subject: ITS#3471 don't yield unnecessarily X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~296 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b18bc61831c56bf52b2935185cb86a7358f09dce;p=openldap ITS#3471 don't yield unnecessarily --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 1712234757..147400ee84 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1714,10 +1714,12 @@ slapd_daemon_task( case 0: /* timeout - let threads run */ ebadf = 0; +#ifndef HAVE_YIELDING_SELECT Debug( LDAP_DEBUG_CONNS, "daemon: select timeout - yielding\n", 0, 0, 0 ); ldap_pvt_thread_yield(); +#endif continue; default: /* something happened - deal with it */ @@ -1770,7 +1772,9 @@ slapd_daemon_task( /* bypass the following tests if no descriptors left */ if ( ns <= 0 ) { +#ifndef HAVE_YIELDING_SELECT ldap_pvt_thread_yield(); +#endif continue; } @@ -1966,7 +1970,9 @@ slapd_daemon_task( } #endif /* SLAP_EVENTS_ARE_INDEXED */ +#ifndef HAVE_YIELDING_SELECT ldap_pvt_thread_yield(); +#endif } if( slapd_shutdown == 1 ) {