Add GetNewHandleTable and GetGlobalHandleTable to interface.
authorAditya Mandaleeka <adityam@microsoft.com>
Wed, 12 Apr 2017 01:05:05 +0000 (18:05 -0700)
committerAditya Mandaleeka <adityam@microsoft.com>
Wed, 12 Apr 2017 01:29:32 +0000 (18:29 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/734f13c964610d1f4fee08611beca1aa02de0082

src/coreclr/src/gc/gchandletable.cpp
src/coreclr/src/gc/gchandletableimpl.h
src/coreclr/src/gc/gcinterface.h

index a2303c2..7ac006d 100644 (file)
@@ -23,6 +23,16 @@ void GCHandleTable::Shutdown()
     Ref_Shutdown();
 }
 
+void* GCHandleTable::GetGlobalHandleTable()
+{
+    return (void*)g_HandleTableMap.pBuckets[0];
+}
+
+void* GCHandleTable::GetNewHandleTable(void* context)
+{
+    return (void*)::Ref_CreateHandleTableBucket(ADIndex((uintptr_t)context));
+}
+
 void* GCHandleTable::GetHandleContext(OBJECTHANDLE handle)
 {
     return (void*)((uintptr_t)::HndGetHandleTableADIndex(::HndGetHandleTable(handle)).m_dwIndex);
index bfcab20..1cac0d2 100644 (file)
@@ -14,6 +14,10 @@ public:
 
     virtual void Shutdown();
 
+    virtual void* GetGlobalHandleTable();
+
+    virtual void* GetNewHandleTable(void* context);
+
     virtual void* GetHandleContext(OBJECTHANDLE handle);
 
     virtual OBJECTHANDLE CreateHandleOfType(void* table, Object* object, int type);
index f2c4bdd..5be332b 100644 (file)
@@ -411,6 +411,10 @@ public:
 
     virtual void* GetHandleContext(OBJECTHANDLE handle) = 0;
 
+    virtual void* GetGlobalHandleTable() = 0;
+
+    virtual void* GetNewHandleTable(void* context) = 0;
+
     virtual OBJECTHANDLE CreateHandleOfType(void* table, Object* object, int type) = 0;
 
     virtual OBJECTHANDLE CreateHandleWithExtraInfo(void* table, Object* object, int type, void* pExtraInfo) = 0;