From 8f0adba7cbac2391719896947601e403b5895fdc Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Mon, 1 Nov 2010 14:26:30 -0700 Subject: Add code to mark functions rather than whole files as threadable. Change-Id: Ie635fbbb96b8ade48501ec564fe135edc256537d --- libs/rs/rsScriptC.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libs/rs/rsScriptC.cpp') diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index a2a08e50f9c0..c692bc1e9978 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -400,16 +400,14 @@ static BCCvoid* symbolLookup(BCCvoid* pContext, const BCCchar* name) const ScriptCState::SymbolTable_t *sym; ScriptC *s = (ScriptC *)pContext; sym = ScriptCState::lookupSymbol(name); - if (sym) { - return sym->mPtr; + if (!sym) { + sym = ScriptCState::lookupSymbolCL(name); } - sym = ScriptCState::lookupSymbolCL(name); - if (sym) { - return sym->mPtr; + if (!sym) { + sym = ScriptCState::lookupSymbolGL(name); } - s->mEnviroment.mIsThreadable = false; - sym = ScriptCState::lookupSymbolGL(name); if (sym) { + s->mEnviroment.mIsThreadable &= sym->threadable; return sym->mPtr; } LOGE("ScriptC sym lookup failed for %s", name); -- cgit v1.2.3-59-g8ed1b