summaryrefslogtreecommitdiff
path: root/src/strongname
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-10-14 03:01:25 +0200
committerJan Vorlicek <janvorli@microsoft.com>2015-12-24 10:09:30 +0100
commit54990d90fcffbae79d72cfb2e37bb4cac4e0660c (patch)
tree299c88fa672bbdb2b4ce609df52945cf7d29326d /src/strongname
parent38e554e5dcb8f6de9c014c5e1839b564a64937f6 (diff)
downloadcoreclr-54990d90fcffbae79d72cfb2e37bb4cac4e0660c.tar.gz
coreclr-54990d90fcffbae79d72cfb2e37bb4cac4e0660c.tar.bz2
coreclr-54990d90fcffbae79d72cfb2e37bb4cac4e0660c.zip
GC OS interface refactoring
This change replaces all calls of OS specific functions in the GC by a call to a platform agnostic interface. Critical sections were abstracted too. The logging file access was changed to use CRT functions instead of Windows specific APIs. A "size" member was added to the card_table_info so that we can pass the right size to the VirtualRelease method when destroying the card table. I have also fixed a bug in the gc_heap::make_card_table error path where when VirtualCommit failed, it called VirtualRelease with size that was not the reserved size, but the committed size. Other related changes - All interlocked operations moved to Interlocked class as static methods - Removed unused function prototypes - Shuffled stuff in the root CMakeLists.txt to enable building the GC sample using the settings inherited from the root CMakeLists.txt and to clean up some things that have rotted over time, like the FEATURE_xxx macros not being in one alphabetically ordered block - Fixed the VOLATILE_MEMORY_BARRIER macro in the gcenv.base.h - Replaced uint32_t thread id by EEThreadId - Removed thread handles storage (g_gc_thread) from the GC. The thread handle is closed right after the thread is launched. That allowed me to get rid of the GCThreadHandle - Renamed the methods of the EEThreadId to be easier to understand - Moved the gcenv.windows.cpp and gcenv.unix.cpp to the sample folder
Diffstat (limited to 'src/strongname')
-rw-r--r--src/strongname/api/api.props3
-rw-r--r--src/strongname/api/common.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/strongname/api/api.props b/src/strongname/api/api.props
index 2c4c278a69..cba28116b8 100644
--- a/src/strongname/api/api.props
+++ b/src/strongname/api/api.props
@@ -7,7 +7,8 @@
$(Clrbase)\src\inc;
$(Clrbase)\src\md\inc;
$(Clrbase)\src\md\compiler;
- $(Clrbase)\src\vm
+ $(Clrbase)\src\vm;
+ $(Clrbase)\src\gc\env
</UserIncludes>
<UserIncludes Condition="'$(StrongnameInVm)' == 'true'">
diff --git a/src/strongname/api/common.h b/src/strongname/api/common.h
index 45f14a8b2b..ea315e44ac 100644
--- a/src/strongname/api/common.h
+++ b/src/strongname/api/common.h
@@ -270,6 +270,9 @@ namespace Loader
#if STRONGNAME_IN_VM
// src/vm
+#include "gcenv.interlocked.h"
+#include "gcenv.interlocked.inl"
+
#include "util.hpp"
#include "ibclogger.h"
#include "eepolicy.h"