]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Import ITS#3471 fix from HEAD - don't yield unnecessarily
authorHoward Chu <hyc@openldap.org>
Fri, 21 Jan 2005 00:36:15 +0000 (00:36 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Jan 2005 00:36:15 +0000 (00:36 +0000)
servers/slapd/daemon.c

index 502eacff55edab928add802b9b06a7a7c323ebad..0845ac596336ce5cd2f34f661d22dda5c2efa1a5 100644 (file)
@@ -1451,6 +1451,7 @@ slapd_daemon_task(
 
                case 0:         /* timeout - let threads run */
                        ebadf = 0;
+#ifndef HAVE_YIELDING_SELECT
 #ifdef NEW_LOGGING
                        LDAP_LOG( CONNECTION, DETAIL2,
                                   "slapd_daemon_task: select timeout - yielding\n", 0, 0, 0 );
@@ -1460,6 +1461,7 @@ slapd_daemon_task(
 #endif
 
                        ldap_pvt_thread_yield();
+#endif
                        continue;
 
                default:        /* something happened - deal with it */
@@ -1932,7 +1934,9 @@ slapd_daemon_task(
                                slapd_close( rd );
                        }
                }
+#ifndef HAVE_YIELDING_SELECT
                ldap_pvt_thread_yield();
+#endif
        }
 
        if( slapd_shutdown == 1 ) {