use pthread_equal function instead of comparison