From ae4ab0f617bd6d9f544193f2fb7edfa1c7169056 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 5 Jul 2007 14:51:01 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ src/common/compat.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ef69fd97a5..196474e731 100644 --- a/ChangeLog +++ b/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. diff --git a/src/common/compat.h b/src/common/compat.h index 121683fcdb..e75c98a0c2 100644 --- a/src/common/compat.h +++ b/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