]> git.sur5r.net Git - openldap/commitdiff
ITS#3471 don't yield unnecessarily
authorHoward Chu <hyc@openldap.org>
Fri, 21 Jan 2005 00:04:05 +0000 (00:04 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Jan 2005 00:04:05 +0000 (00:04 +0000)
servers/slapd/daemon.c

index 17122347577d820caa66eb702dcd9c7c0724da1f..147400ee844a1c3defa750c9f9d7db82ba95bc23 100644 (file)
@@ -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 ) {