OSDN Git Service

Remove dead NULL checks from pthread code.
authorElliott Hughes <enh@google.com>
Tue, 4 Mar 2014 18:55:39 +0000 (10:55 -0800)
committerElliott Hughes <enh@google.com>
Tue, 4 Mar 2014 18:55:39 +0000 (10:55 -0800)
commit39b644a0e270df453c53d6060cd364391bb1c512
treefc937b2b00e2efe603ac0bd48fc0a1c832b46456
parenta0bf9bdea24164db96ec1d5dfa2cd327942671b6
Remove dead NULL checks from pthread code.

GCC is removing these checks anyway because it knows the arguments
must be non-null, so leaving this code around is just confusing.

We know from experience that people were shipping code with locking
bugs because they weren't checking for error returns. Failing hard
like glibc does seems the better choice. (And it's what the checked
in code was already doing; this patch doesn't change that. It just
makes it more obvious that that's what's going on.)

Change-Id: I167c6d7c0a296822baf0cb9b43b97821eba7ab35
libc/bionic/pthread_cond.cpp
libc/bionic/pthread_mutex.cpp
libc/bionic/pthread_rwlock.cpp
libc/bionic/pthread_setname_np.cpp