From: Mark Andrews Date: Mon, 18 Jun 2007 01:22:08 +0000 (+0000) Subject: 2196. [port] win32: yield processor while waiting for once to X-Git-Tag: v9.2.0b1^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98b767dff62ceeaf28c56a6c96f31de7167d6ed0;p=thirdparty%2Fbind9.git 2196. [port] win32: yield processor while waiting for once to to complete. [RT# 16958] --- diff --git a/CHANGES b/CHANGES index 4085b4388c2..0e2611bbe7b 100644 --- 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. diff --git a/lib/isc/win32/once.c b/lib/isc/win32/once.c index 69102825066..a77fffe1513 100644 --- a/lib/isc/win32/once.c +++ b/lib/isc/win32/once.c @@ -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); } } }