[or-cvs] r10739: Switch windows locking implementation to CRITICAL_SECTION, n (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Thu Jul 5 14:51:01 UTC 2007


Author: nickm
Date: 2007-07-05 10:51:01 -0400 (Thu, 05 Jul 2007)
New Revision: 10739

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/common/compat.c
   tor/trunk/src/common/compat.h
Log:
 r13454 at kushana:  nickm | 2007-06-20 14:22:44 -0400
 Switch windows locking implementation to CRITICAL_SECTION, not Mutex: Mutex is heavier-weight, and meant for multi-process situations.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13454] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-07-05 14:50:13 UTC (rev 10738)
+++ tor/trunk/ChangeLog	2007-07-05 14:51:01 UTC (rev 10739)
@@ -16,6 +16,11 @@
     - Report address and port correctly on connections to DNSPort. (Patch
       from Robert Hogan.)
 
+  o Performance improvements (win32):
+    - Use Critical Sections rather than Mutexes for synchronizing threads
+      on win32; Mutexes are heavier-weight, and designed for synchronizing
+      between processes.
+
   o Deprecated features:
     - RedirectExits is now deprecated.
 

Modified: tor/trunk/src/common/compat.c
===================================================================

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2007-07-05 14:50:13 UTC (rev 10738)
+++ tor/trunk/src/common/compat.h	2007-07-05 14:51:01 UTC (rev 10739)
@@ -131,7 +131,7 @@
 #define STMT_END } else STMT_NIL
 #else
 #define STMT_BEGIN do {
-#define STMT_END } while(0)
+#define STMT_END } while (0)
 #endif
 #endif
 



More information about the tor-commits mailing list