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

Commit 8267a0b4 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Binder: Add log output in IPCThreadState::self()" am: 2be113a2 am: e7ae3b19

am: 35cadd73

* commit '35cadd73':
  Binder: Add log output in IPCThreadState::self()
parents 040424fd 35cadd73
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -287,12 +287,18 @@ restart:
        return new IPCThreadState;
    }
    
    if (gShutdown) return NULL;
    if (gShutdown) {
        ALOGW("Calling IPCThreadState::self() during shutdown is dangerous, expect a crash.\n");
        return NULL;
    }
    
    pthread_mutex_lock(&gTLSMutex);
    if (!gHaveTLS) {
        if (pthread_key_create(&gTLS, threadDestructor) != 0) {
        int key_create_value = pthread_key_create(&gTLS, threadDestructor);
        if (key_create_value != 0) {
            pthread_mutex_unlock(&gTLSMutex);
            ALOGW("IPCThreadState::self() unable to create TLS key, expect a crash: %s\n",
                    strerror(key_create_value));
            return NULL;
        }
        gHaveTLS = true;