diff options
author | Jason Sams <rjsams@android.com> | 2010-11-01 14:26:30 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-11-01 14:26:30 -0700 |
commit | 6bfc1b91dc7684f8ad9dc9f605e92ed8a31d5bbe (patch) | |
tree | cf86e88e5ecd6c6e8a35b50b356044b892a17b52 /rsScriptC.cpp | |
parent | fbc79e5ad14c1cb68409043fbaf9a2ec4dcf6812 (diff) | |
download | rs-6bfc1b91dc7684f8ad9dc9f605e92ed8a31d5bbe.tar.gz |
Add code to mark functions rather than whole files as threadable.
Change-Id: Ie635fbbb96b8ade48501ec564fe135edc256537d
Diffstat (limited to 'rsScriptC.cpp')
-rw-r--r-- | rsScriptC.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index a2a08e50..c692bc1e 100644 --- a/rsScriptC.cpp +++ b/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); |