summaryrefslogtreecommitdiff
path: root/src/vm/clrex.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/clrex.inl')
-rw-r--r--src/vm/clrex.inl51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/vm/clrex.inl b/src/vm/clrex.inl
new file mode 100644
index 0000000000..06c82f8a40
--- /dev/null
+++ b/src/vm/clrex.inl
@@ -0,0 +1,51 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+
+//
+// ---------------------------------------------------------------------------
+// CLREx.h
+// ---------------------------------------------------------------------------
+
+
+#ifndef _CLREX_INL_
+#define _CLREX_INL_
+
+inline CLRException::HandlerState::HandlerState(Thread * pThread)
+{
+ STATIC_CONTRACT_NOTHROW;
+ STATIC_CONTRACT_GC_NOTRIGGER;
+ STATIC_CONTRACT_MODE_ANY;
+ STATIC_CONTRACT_CANNOT_TAKE_LOCK;
+ STATIC_CONTRACT_SO_TOLERANT;
+
+ m_pThread = pThread;
+ if (m_pThread == NULL)
+ {
+ m_pFrame = NULL;
+ m_fPreemptiveGCDisabled = FALSE;
+ }
+ else
+ {
+ m_pFrame = m_pThread->GetFrame();
+ m_fPreemptiveGCDisabled = m_pThread->PreemptiveGCDisabled();
+ }
+}
+
+inline CLRException::HandlerState::HandlerState(Thread * pThread, CLRException::HandlerState::NonNullThread dummy)
+{
+ STATIC_CONTRACT_NOTHROW;
+ STATIC_CONTRACT_GC_NOTRIGGER;
+ STATIC_CONTRACT_MODE_ANY;
+ STATIC_CONTRACT_CANNOT_TAKE_LOCK;
+ STATIC_CONTRACT_SO_TOLERANT;
+ _ASSERTE(pThread != NULL);
+
+ m_pThread = pThread;
+ m_pFrame = m_pThread->GetFrame();
+ m_fPreemptiveGCDisabled = m_pThread->PreemptiveGCDisabled();
+}
+
+
+#endif // _CLREX_INL_