Browse Source

r13454@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.


svn:r10739

Nick Mathewson 17 years ago
parent
commit
ae4ab0f617
2 changed files with 6 additions and 1 deletions
  1. 5 0
      ChangeLog
  2. 1 1
      src/common/compat.h

+ 5 - 0
ChangeLog

@@ -16,6 +16,11 @@ Changes in version 0.2.0.3-alpha - 2007-??-??
     - 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.
 

+ 1 - 1
src/common/compat.h

@@ -131,7 +131,7 @@ extern INLINE double U64_TO_DBL(uint64_t x) {
 #define STMT_END } else STMT_NIL
 #else
 #define STMT_BEGIN do {
-#define STMT_END } while(0)
+#define STMT_END } while (0)
 #endif
 #endif