]> 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:22:08 +0000 (01:22 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 01:22:08 +0000 (01:22 +0000)
                        to complete. [RT# 16958]

CHANGES
lib/isc/win32/once.c

diff --git a/CHANGES b/CHANGES
index 4085b4388c2d1bac1128d5b422af80dea156a365..0e2611bbe7b851e99eaae7ef5bbc86d08efe9bca 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2196.  [port]          win32: yield processor while waiting for once to
+                       to complete. [RT# 16958]
+
 2194.  [bug]           Close journal before calling 'done' in xfrin.c.
 
 2193.  [port]          win32: BINDInstall.exe is now linked statically.
index 6910282506683b8790b67ff01b8541657b354abe..a77fffe15133b0b88e3c8c0e269f55c89c0f26f0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: once.c,v 1.9.2.1 2004/03/09 06:12:19 marka Exp $ */
+/* $Id: once.c,v 1.9.2.2 2007/06/18 01:22:08 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);
                        }
                }
        }