From b7282bd2e773de998056c76d3da5d156c872114c Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Tue, 7 Dec 2010 13:44:10 -0800 Subject: Make ScriptC's mEnvironment.mIsThreadable survive the bcc caching and then cache-reloading. Change-Id: I0f5d54160dd9ee567fae53c69b246f99096993da --- libs/rs/rsScriptC.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/rs/rsScriptC.cpp') diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 6587b51627db..d4edafd4186b 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -378,6 +378,12 @@ void ScriptCState::clear(Context *rsc) { static BCCvoid* symbolLookup(BCCvoid* pContext, const BCCchar* name) { const ScriptCState::SymbolTable_t *sym; ScriptC *s = (ScriptC *)pContext; + if (!strcmp(name, "__isThreadable")) { + return (BCCvoid*) s->mEnviroment.mIsThreadable; + } else if (!strcmp(name, "__clearThreadable")) { + s->mEnviroment.mIsThreadable = false; + return NULL; + } sym = ScriptCState::lookupSymbol(name); if (!sym) { sym = ScriptCState::lookupSymbolCL(name); -- cgit v1.2.3-59-g8ed1b