summaryrefslogtreecommitdiff
path: root/src/gc/gchandletableimpl.h
diff options
context:
space:
mode:
authorAditya Mandaleeka <adityam@microsoft.com>2017-04-11 19:34:15 -0700
committerAditya Mandaleeka <adityam@microsoft.com>2017-04-13 14:54:20 -0700
commitda00894a5d657b3ba06ebf6e004e5a5a0976434b (patch)
tree57baf82c36b843b8c15454ffb98439c06f46e99e /src/gc/gchandletableimpl.h
parent583713bd78ab202c62ba6beec83db2204bd0a361 (diff)
downloadcoreclr-da00894a5d657b3ba06ebf6e004e5a5a0976434b.tar.gz
coreclr-da00894a5d657b3ba06ebf6e004e5a5a0976434b.tar.bz2
coreclr-da00894a5d657b3ba06ebf6e004e5a5a0976434b.zip
Make a GCHandleStore class and interface for use by the VM.
Diffstat (limited to 'src/gc/gchandletableimpl.h')
-rw-r--r--src/gc/gchandletableimpl.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/src/gc/gchandletableimpl.h b/src/gc/gchandletableimpl.h
index af20f52e54..1635c6eb79 100644
--- a/src/gc/gchandletableimpl.h
+++ b/src/gc/gchandletableimpl.h
@@ -6,33 +6,49 @@
#define GCHANDLETABLE_H_
#include "gcinterface.h"
+#include "objecthandle.h"
-class GCHandleTable : public IGCHandleTable
+class GCHandleStore : public IGCHandleStore
{
public:
- virtual bool Initialize();
+ GCHandleStore(HandleTableBucket *bucket)
+ : _underlyingBucket(bucket)
+ { }
- virtual void Shutdown();
+ virtual void Uproot();
- virtual void* GetGlobalHandleStore();
+ virtual bool ContainsHandle(OBJECTHANDLE handle);
- virtual void* CreateHandleStore(void* context);
+ virtual OBJECTHANDLE CreateHandleOfType(Object* object, int type);
- virtual void* GetHandleContext(OBJECTHANDLE handle);
+ virtual OBJECTHANDLE CreateHandleOfType(Object* object, int type, int heapToAffinitizeTo);
- virtual void DestroyHandleStore(void* store);
+ virtual OBJECTHANDLE CreateHandleWithExtraInfo(Object* object, int type, void* pExtraInfo);
- virtual void UprootHandleStore(void* store);
+ virtual OBJECTHANDLE CreateDependentHandle(Object* primary, Object* secondary);
- virtual bool ContainsHandle(void* store, OBJECTHANDLE handle);
+ virtual ~GCHandleStore();
- virtual OBJECTHANDLE CreateHandleOfType(void* store, Object* object, int type);
+private:
+ HandleTableBucket* _underlyingBucket;
+};
+
+extern GCHandleStore* g_gcGlobalHandleStore;
+
+class GCHandleTable : public IGCHandleTable
+{
+public:
+ virtual bool Initialize();
+
+ virtual void Shutdown();
+
+ virtual void* GetHandleContext(OBJECTHANDLE handle);
- virtual OBJECTHANDLE CreateHandleOfType(void* store, Object* object, int type, int heapToAffinitizeTo);
+ virtual IGCHandleStore* GetGlobalHandleStore();
- virtual OBJECTHANDLE CreateHandleWithExtraInfo(void* store, Object* object, int type, void* pExtraInfo);
+ virtual IGCHandleStore* CreateHandleStore(void* context);
- virtual OBJECTHANDLE CreateDependentHandle(void* store, Object* primary, Object* secondary);
+ virtual void DestroyHandleStore(IGCHandleStore* store);
virtual OBJECTHANDLE CreateGlobalHandleOfType(Object* object, int type);