OSDN Git Service

Remove harmful attempts to be helpful in pthread_mutex functions.
authorElliott Hughes <enh@google.com>
Wed, 11 Dec 2013 22:54:00 +0000 (14:54 -0800)
committerElliott Hughes <enh@google.com>
Wed, 11 Dec 2013 22:54:00 +0000 (14:54 -0800)
commitdff7203ee99ccac446b9a1c4371753a5216c6db4
tree854bf99a06ea89a29e8eee49d0c5cc361e30531c
parent73ef27cd0de0c6b7d4f6bc9c2250dbae3f0a88c3
Remove harmful attempts to be helpful in pthread_mutex functions.

Most callers won't check for EINVAL, so it's best to fail early.
GCC takes the nonnull attribute as a guarantee that an argument
won't be NULL, so these hacks were already ineffective, which is
how we found that at least one commercial game was using NULL
as if it's a mutex, but actually getting no-op behavior.

Bug: 11971278
Change-Id: I89646e043d931778805a8b692e07a34d076ee6bf
libc/bionic/pthread_mutex.cpp