summaryrefslogtreecommitdiff
path: root/src/vm/threadsuspend.h
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2018-07-07 09:33:14 -0700
committerAndrew Au <cshung@gmail.com>2018-11-06 18:34:47 -0800
commiteba995ab407dea951c933e8804b4982215575c1b (patch)
tree26e1f4b0071cdc9ca14430173751053e7fa90f3b /src/vm/threadsuspend.h
parent8fc1cb2b537845ce9f59e7cd422ba01bc2d3011c (diff)
downloadcoreclr-eba995ab407dea951c933e8804b4982215575c1b.tar.gz
coreclr-eba995ab407dea951c933e8804b4982215575c1b.tar.bz2
coreclr-eba995ab407dea951c933e8804b4982215575c1b.zip
Simple fixes
Diffstat (limited to 'src/vm/threadsuspend.h')
-rw-r--r--src/vm/threadsuspend.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vm/threadsuspend.h b/src/vm/threadsuspend.h
index 022e46a35e..bd322fc61b 100644
--- a/src/vm/threadsuspend.h
+++ b/src/vm/threadsuspend.h
@@ -263,4 +263,21 @@ private:
static LONG m_DebugWillSyncCount;
};
+// void(*)(BOOL,ThreadSuspend::SUSPEND_REASON)
+
+class ThreadStoreLockHolderWithSuspendReason
+{
+public:
+ ThreadStoreLockHolderWithSuspendReason(ThreadSuspend::SUSPEND_REASON reason)
+ {
+ ThreadSuspend::LockThreadStore(reason);
+ }
+ ~ThreadStoreLockHolderWithSuspendReason()
+ {
+ ThreadSuspend::UnlockThreadStore();
+ }
+private:
+ ThreadSuspend::SUSPEND_REASON m_reason;
+};
+
#endif // _THREAD_SUSPEND_H_