From: Aditya Mandaleeka Date: Wed, 12 Apr 2017 01:05:05 +0000 (-0700) Subject: Add GetNewHandleTable and GetGlobalHandleTable to interface. X-Git-Tag: submit/tizen/20210909.063632~11030^2~7288^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39f665f3b36045186e6b7806573d8660e7c46c33;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add GetNewHandleTable and GetGlobalHandleTable to interface. Commit migrated from https://github.com/dotnet/coreclr/commit/734f13c964610d1f4fee08611beca1aa02de0082 --- diff --git a/src/coreclr/src/gc/gchandletable.cpp b/src/coreclr/src/gc/gchandletable.cpp index a2303c2..7ac006d 100644 --- a/src/coreclr/src/gc/gchandletable.cpp +++ b/src/coreclr/src/gc/gchandletable.cpp @@ -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); diff --git a/src/coreclr/src/gc/gchandletableimpl.h b/src/coreclr/src/gc/gchandletableimpl.h index bfcab20..1cac0d2 100644 --- a/src/coreclr/src/gc/gchandletableimpl.h +++ b/src/coreclr/src/gc/gchandletableimpl.h @@ -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); diff --git a/src/coreclr/src/gc/gcinterface.h b/src/coreclr/src/gc/gcinterface.h index f2c4bdd..5be332b 100644 --- a/src/coreclr/src/gc/gcinterface.h +++ b/src/coreclr/src/gc/gcinterface.h @@ -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;