adb: fix a fake data race on transport:kick reported by tsan.
It is reported by tsan as a double checked locking. But I think it is not a real data race. Because I think the old code is able to make sure t->kick() is only called once, and the caller of kick_transport is not relying on the side-effect of calling t->kick(). But as it is not perf critical, I don't mind breaking the double checked locking pattern. Bug: 23385662 Change-Id: Ie3597dd56bb514117c3865d2afcfd7c115731a78
This commit is contained in:
parent
53f11b620d
commit
d8459b3d3c
|
@ -43,7 +43,7 @@ ADB_MUTEX_DEFINE( transport_lock );
|
|||
|
||||
void kick_transport(atransport* t)
|
||||
{
|
||||
if (t && !t->kicked)
|
||||
if (t != nullptr)
|
||||
{
|
||||
int kicked;
|
||||
|
||||
|
|
Loading…
Reference in New Issue