get self pthread id and compare with pthread_equal