using pthread_equal to compare thread ids