]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2196. [port] win32: yield processor while waiting for once to
authorMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 01:16:46 +0000 (01:16 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 01:16:46 +0000 (01:16 +0000)
                        to complete. [RT# 16958]

CHANGES
lib/isc/win32/once.c

diff --git a/CHANGES b/CHANGES
index a2cd9b4d02aaea0b497088a8e00d707a972f1c73..8e363749f7ff2390ee6106949c56f7856f1dd7ee 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2196.  [port]          win32: yield processor while waiting for once to
+                       to complete. [RT# 16958]
+
 2195.  [func]          dnssec-keygen now defaults to nametype "ZONE"
                        when generating DNSKEYs. [RT #16954]
 
index b38e38c415bb8f2946dbed7577b705ce5fde2600..76dd82dfe4f530dfa19bda3e040fa62ae9120045 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: once.c,v 1.10 2004/03/05 05:11:58 marka Exp $ */
+/* $Id: once.c,v 1.11 2007/06/18 01:16:46 marka Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -41,8 +41,11 @@ isc_once_do(isc_once_t *controller, void(*function)(void)) {
                } else {
                        while (controller->status == ISC_ONCE_INIT_NEEDED) {
                                /*
-                                * Spin wait.
+                                * Sleep(0) indicates that this thread 
+                                * should be suspended to allow other 
+                                * waiting threads to execute.
                                 */
+                               Sleep(0);
                        }
                }
        }