Support LinkRuntimeCallback() with RS compiler.
Change-Id: I28ada4e7c462cb9673de6886d934dce855fac339
diff --git a/cpu_ref/rsCpuCore.cpp b/cpu_ref/rsCpuCore.cpp
index 75fc3f1..06e5ce7 100644
--- a/cpu_ref/rsCpuCore.cpp
+++ b/cpu_ref/rsCpuCore.cpp
@@ -46,8 +46,8 @@
}
RsdCpuReference * RsdCpuReference::create(Context *rsc, uint32_t version_major,
- uint32_t version_minor, sym_lookup_t lfn,
- script_lookup_t slfn) {
+ uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn,
+ bcc::RSLinkRuntimeCallback pLinkRuntimeCallback) {
RsdCpuReferenceImpl *cpu = new RsdCpuReferenceImpl(rsc);
if (!cpu) {
@@ -57,6 +57,9 @@
delete cpu;
return NULL;
}
+
+ cpu->setLinkRuntimeCallback(pLinkRuntimeCallback);
+
return cpu;
}
@@ -71,6 +74,7 @@
return tls->mScript;
}
+pthread_key_t RsdCpuReference::getThreadTLSKey(){ return gThreadTLSKey; }
////////////////////////////////////////////////////////////
///
@@ -84,6 +88,7 @@
memset(&mWorkers, 0, sizeof(mWorkers));
memset(&mTlsStruct, 0, sizeof(mTlsStruct));
mExit = false;
+ mLinkRuntimeCallback = NULL;
}