tsan: use pthread_equal instead of direct pthread_t comparison
authorDmitry Vyukov <dvyukov@google.com>
Mon, 15 Nov 2021 18:44:34 +0000 (19:44 +0100)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 16 Nov 2021 06:51:24 +0000 (07:51 +0100)
commit87261caa550d2399b0556af44f60e1482d8c4179
tree349d99631b6bd73ca49da2b7a8a7481cb6a2c5db
parent64b45399e5c547dc59ea3c72891fccdda7284eaa
tsan: use pthread_equal instead of direct pthread_t comparison

man pthread_equal:
  The pthread_equal() function is necessary because thread IDs
  should be considered opaque: there is no portable way for
  applications to directly compare two pthread_t values.

Depends on D113916.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D113919
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp