summaryrefslogtreecommitdiff
path: root/src/vm/syncclean.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/syncclean.hpp')
-rw-r--r--src/vm/syncclean.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/vm/syncclean.hpp b/src/vm/syncclean.hpp
new file mode 100644
index 0000000000..83c8b18601
--- /dev/null
+++ b/src/vm/syncclean.hpp
@@ -0,0 +1,30 @@
+// 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.
+
+
+#ifndef _SYNCCLEAN_HPP_
+#define _SYNCCLEAN_HPP_
+
+// We keep a list of memory blocks to be freed at the end of GC, but before we resume EE.
+// To make this work, we need to make sure that these data are accessed in cooperative GC
+// mode.
+
+class Bucket;
+struct EEHashEntry;
+class Crst;
+class CrstStatic;
+
+class SyncClean {
+public:
+ static void Terminate ();
+
+ static void AddHashMap (Bucket *bucket);
+ static void AddEEHashTable (EEHashEntry** entry);
+ static void CleanUp ();
+
+private:
+ static VolatilePtr<Bucket> m_HashMap; // Cleanup list for HashMap
+ static VolatilePtr<EEHashEntry *> m_EEHashTable; // Cleanup list for EEHashTable
+};
+#endif