@@ -84,6 +84,37 @@ extern "C" GMM_LIB_API GMM_STATUS GMM_STDCALL OpenGmm(GmmExportEntries *pm_GmmFu
8484 return Status;
8585}
8686
87+ // ///////////////////////////////////////////////////////////////////////////////////
88+ // / First Call to GMM Lib DLL/so to initialize singleton global context
89+ // / and create client context
90+ // /
91+ // ///////////////////////////////////////////////////////////////////////////////////
92+ #ifdef _WIN32
93+ extern " C" GMM_LIB_API GMM_CLIENT_CONTEXT *GMM_STDCALL GmmInit (const PLATFORM Platform,
94+ const SKU_FEATURE_TABLE *pSkuTable,
95+ const WA_TABLE * pWaTable,
96+ const GT_SYSTEM_INFO * pGtSysInfo,
97+ GMM_CLIENT ClientType)
98+ #else
99+ extern " C" GMM_LIB_API GMM_CLIENT_CONTEXT *GMM_STDCALL GmmInit (const PLATFORM Platform,
100+ const void * pSkuTable,
101+ const void * pWaTable,
102+ const void * pGtSysInfo,
103+ GMM_CLIENT ClientType)
104+ #endif
105+ {
106+ GMM_STATUS Status = GMM_SUCCESS;
107+ GMM_CLIENT_CONTEXT *pClientContext = NULL ;
108+
109+ Status = GmmCreateSingletonContext (Platform, pSkuTable, pWaTable, pGtSysInfo);
110+
111+ if (Status == GMM_SUCCESS)
112+ {
113+ pClientContext = GmmCreateClientContext (ClientType);
114+ }
115+
116+ return pClientContext;
117+ }
87118// ///////////////////////////////////////////////////////////////////////////////////
88119// First Call to GMM Lib DLL/so to initialize singleton global context
89120// and create client context
@@ -106,10 +137,20 @@ extern "C" GMM_LIB_API GMM_STATUS GMM_STDCALL InitializeGmm(GMM_INIT_IN_ARGS *pI
106137 return Status;
107138}
108139
140+ // ///////////////////////////////////////////////////////////////////////////////////
141+ // / Destroys singleton global context and client context
142+ // /
143+ // ///////////////////////////////////////////////////////////////////////////////////
144+ extern " C" GMM_LIB_API void GMM_STDCALL GmmDestroy (GMM_CLIENT_CONTEXT *pGmmClientContext)
145+ {
146+ GmmDestroySingletonContext ();
147+ GmmDeleteClientContext (pGmmClientContext);
148+ }
149+
109150// ///////////////////////////////////////////////////////////////////////////////////
110151// Destroys singleton global context and client context
111152// ///////////////////////////////////////////////////////////////////////////////////
112- extern " C" GMM_LIB_API void GMM_STDCALL GmmDestroy (GMM_INIT_OUT_ARGS *pInArgs)
153+ extern " C" GMM_LIB_API void GMM_STDCALL GmmAdapterDestroy (GMM_INIT_OUT_ARGS *pInArgs)
113154{
114155 if (pInArgs && pInArgs->pGmmClientContext )
115156 {
0 commit comments