summaryrefslogtreecommitdiff
path: root/src/inc/stdmacros.h
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@microsoft.com>2016-01-07 11:21:27 -0800
committerKoundinya Veluri <kouvel@microsoft.com>2016-04-12 16:29:38 -0700
commitc235ae17cd3a87f8032948bdcb838641d8e6c055 (patch)
treecc2c3756157456898b4720709c9efbfc4c90ccd8 /src/inc/stdmacros.h
parent7f95d79740d5f5b13d6a0df1b94654e622053a5f (diff)
downloadcoreclr-c235ae17cd3a87f8032948bdcb838641d8e6c055.tar.gz
coreclr-c235ae17cd3a87f8032948bdcb838641d8e6c055.tar.bz2
coreclr-c235ae17cd3a87f8032948bdcb838641d8e6c055.zip
Implement software write watch and make concurrent GC functional outside Windows
- Implemented software write watch using write barriers - A new set of write barriers is introduced, each corresponding to an existing one, but which also updates the write watch table. The GC switches to a write watch barrier during concurrent GC, and switches back to a non write watch barrier after the final query for dirty pages. - The write watch table is alloacted along with the card table - Since the card table is used differently, different synchonization is used for the write watch table. The runtime is suspended during resize since that is the most infrequently occuring operation, of that, ResetWriteWatch, and GetWriteWatch. - ResetWriteWatch() doesn't need a suspend, but since the software WW version is much faster than the Windows version, moved it into the suspended region to avoid some synchronization that would otherwise be required - The background calls to GetWriteWatch() don't need or do a suspend. They only need to synchronize with the resize path, not for the purpose of correct functionality, but to not miss dirty pages such that concurrent GC is effective. Miscellaneous: - Fixed runtests.sh to copy mscorlib.dll and delete the Windows version of mscorlib.ni.dll
Diffstat (limited to 'src/inc/stdmacros.h')
-rw-r--r--src/inc/stdmacros.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inc/stdmacros.h b/src/inc/stdmacros.h
index 6f27c211c5..ab77a2cd91 100644
--- a/src/inc/stdmacros.h
+++ b/src/inc/stdmacros.h
@@ -188,6 +188,12 @@ inline void* ALIGN_UP( void* val, size_t alignment )
return (void*) ALIGN_UP( (size_t)val, alignment );
}
+inline uint8_t* ALIGN_UP( uint8_t* val, size_t alignment )
+{
+ WRAPPER_NO_CONTRACT;
+
+ return (uint8_t*) ALIGN_UP( (size_t)val, alignment );
+}
inline size_t ALIGN_DOWN( size_t val, size_t alignment )
{
@@ -203,6 +209,11 @@ inline void* ALIGN_DOWN( void* val, size_t alignment )
WRAPPER_NO_CONTRACT;
return (void*) ALIGN_DOWN( (size_t)val, alignment );
}
+inline uint8_t* ALIGN_DOWN( uint8_t* val, size_t alignment )
+{
+ WRAPPER_NO_CONTRACT;
+ return (uint8_t*) ALIGN_DOWN( (size_t)val, alignment );
+}
inline BOOL IS_ALIGNED( size_t val, size_t alignment )
{