aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/handler/exception_handler.h
diff options
context:
space:
mode:
authordoshimun <doshimun@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-01-14 20:51:51 +0000
committerdoshimun <doshimun@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-01-14 20:51:51 +0000
commita6f58a1ac8468bc4d1dd785475d535e08b2aa5e9 (patch)
tree33e4b82b8ee0e16c284e6fb34e8cc850f5e99f98 /src/client/windows/handler/exception_handler.h
parentNew test data to reflect Ted's changes that add function parameters to symbol... (diff)
downloadbreakpad-a6f58a1ac8468bc4d1dd785475d535e08b2aa5e9.tar.xz
Minor fixes to windows exception handler.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@306 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.h')
-rw-r--r--src/client/windows/handler/exception_handler.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/windows/handler/exception_handler.h b/src/client/windows/handler/exception_handler.h
index d02f7080..2cacdc38 100644
--- a/src/client/windows/handler/exception_handler.h
+++ b/src/client/windows/handler/exception_handler.h
@@ -340,6 +340,12 @@ class ExceptionHandler {
// The exception handler thread.
HANDLE handler_thread_;
+ // True if the exception handler is being destroyed.
+ // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars.
+ // It has release semantics on write and acquire semantics on reads.
+ // See the msdn documentation.
+ volatile bool is_shutdown_;
+
// The critical section enforcing the requirement that only one exception be
// handled by a handler at a time.
CRITICAL_SECTION handler_critical_section_;
@@ -390,11 +396,12 @@ class ExceptionHandler {
static LONG handler_stack_index_;
// handler_stack_critical_section_ guards operations on handler_stack_ and
- // handler_stack_index_.
+ // handler_stack_index_. The critical section is initialized by the
+ // first instance of the class and destroyed by the last instance of it.
static CRITICAL_SECTION handler_stack_critical_section_;
- // True when handler_stack_critical_section_ has been initialized.
- static bool handler_stack_critical_section_initialized_;
+ // The number of instances of this class.
+ volatile static LONG instance_count_;
// disallow copy ctor and operator=
explicit ExceptionHandler(const ExceptionHandler &);