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

CHANGES
lib/isc/win32/once.c

diff --git a/CHANGES b/CHANGES
index d353e48a6d43ebe9c054a1e4f07b62d927ee6435..ba23654b7197f19ed7e1655f7a3dd9510b44ce8f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2196.  [port]          win32: yield processor while waiting for once to
+                       to complete. [RT# 16958]
 
        --- 9.4.2b1 released ---
 
index b38e38c415bb8f2946dbed7577b705ce5fde2600..ea4c6d67ddd849b7d965a81ac94985f7ddbdb395 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.10.18.1 2007/06/18 01:20:12 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);
                        }
                }
        }