Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12bb2c4c authored by Jason Sams's avatar Jason Sams Committed by Android Git Automerger
Browse files

am fe7c2a50: Merge change I996db8da into eclair

Merge commit 'fe7c2a50' into eclair-mr2

* commit 'fe7c2a50':
  Fix tls crash on startup if more than one RS contexts are created in one process.
parents 1b7ad876 fe7c2a50
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -304,11 +304,16 @@ Context::Context(Device *dev, Surface *sur, bool useDepth)
    int status;
    pthread_attr_t threadAttr;

    if (!gThreadTLSKey) {
        status = pthread_key_create(&gThreadTLSKey, NULL);
        if (status) {
            LOGE("Failed to init thread tls key.");
            return;
        }
    } else {
        // HACK: workaround gl hang on start
        exit(-1);
    }

    status = pthread_attr_init(&threadAttr);
    if (status) {
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ bool ScriptC::run(Context *rsc, uint32_t launchIndex)
{
    Context::ScriptTLSStruct * tls =
    (Context::ScriptTLSStruct *)pthread_getspecific(Context::gThreadTLSKey);
    rsAssert(tls);

    if (mEnviroment.mFragmentStore.get()) {
        rsc->setFragmentStore(mEnviroment.mFragmentStore.get());