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

GitOrigin-RevId: 87261caa550d2399b0556af44f60e1482d8c4179
1 file changed