commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r804950 - in /commons/sandbox/runtime/trunk/src/main/native: include/arch/windows/acr_arch_private.h os/win32/ios.c
Date Mon, 17 Aug 2009 12:21:38 GMT
Author: mturk
Date: Mon Aug 17 12:21:37 2009
New Revision: 804950

URL: http://svn.apache.org/viewvc?rev=804950&view=rev
Log:
Use spincount for critical section. Should favor the multi processor systems

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h?rev=804950&r1=804949&r2=804950&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
Mon Aug 17 12:21:37 2009
@@ -71,6 +71,12 @@
  */
 #define ACR_DELTA_EPOCH_IN_USEC   11644473600000000I64
 
+/** 
+ * Critical section spin count
+ * XXX: MSVCRT uses 4000 which might not be an optimal value 
+ */
+#define ACR_SPINCOUNT 4000 
+
 /**
  * Include needed functions from portable layer
  */

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c?rev=804950&r1=804949&r2=804950&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c Mon Aug 17 12:21:37 2009
@@ -105,7 +105,7 @@
      */
     __bitmap[0] = 0xFF;
     __bmp_hint  = 1;
-    InitializeCriticalSection(&ios_lock);
+    InitializeCriticalSectionAndSpinCount(&ios_lock, ACR_SPINCOUNT);
 
     return 0;
 }



Mime
View raw message