summaryrefslogtreecommitdiff
path: root/src/gc/env
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-12-13 19:46:50 -0800
committerGitHub <noreply@github.com>2017-12-13 19:46:50 -0800
commitbc5a76d93f21392acbdfb8ec820fa287b31f09e4 (patch)
tree4c8521fa7bd5024b531ec43485d7f2a8738cb338 /src/gc/env
parentb3dc9a728ac9ee10ea7df713c8002678120c2e4d (diff)
downloadcoreclr-bc5a76d93f21392acbdfb8ec820fa287b31f09e4.tar.gz
coreclr-bc5a76d93f21392acbdfb8ec820fa287b31f09e4.tar.bz2
coreclr-bc5a76d93f21392acbdfb8ec820fa287b31f09e4.zip
Revert " Revert "[Local GC] Move knowledge of overlapped I/O objects to the EE through four callbacks (#14982)""
Diffstat (limited to 'src/gc/env')
-rw-r--r--src/gc/env/common.h1
-rw-r--r--src/gc/env/gcenv.base.h5
-rw-r--r--src/gc/env/gcenv.ee.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/gc/env/common.h b/src/gc/env/common.h
index 32c0d93577..1c2f75c9d6 100644
--- a/src/gc/env/common.h
+++ b/src/gc/env/common.h
@@ -16,6 +16,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <assert.h>
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h
index 734b46fd3d..e1d40d6003 100644
--- a/src/gc/env/gcenv.base.h
+++ b/src/gc/env/gcenv.base.h
@@ -320,6 +320,11 @@ inline void* ALIGN_DOWN(void* ptr, size_t alignment)
return reinterpret_cast<void*>(ALIGN_DOWN(as_size_t, alignment));
}
+inline int GetRandomInt(int max)
+{
+ return rand() % max;
+}
+
typedef struct _PROCESSOR_NUMBER {
uint16_t Group;
uint8_t Number;
diff --git a/src/gc/env/gcenv.ee.h b/src/gc/env/gcenv.ee.h
index d747a5bbef..44828b7551 100644
--- a/src/gc/env/gcenv.ee.h
+++ b/src/gc/env/gcenv.ee.h
@@ -80,6 +80,8 @@ public:
static bool IsGCThread();
static bool WasCurrentThreadCreatedByGC();
static bool CreateThread(void (*threadStart)(void*), void* arg, bool is_suspendable, const char* name);
+ static void WalkAsyncPinnedForPromotion(Object* object, ScanContext* sc, promote_func* callback);
+ static void WalkAsyncPinned(Object* object, void* context, void(*callback)(Object*, Object*, void*));
};
#endif // __GCENV_EE_H__