As mentioned in the manual - comparing pthread_t handles via the C
comparison operator is incorrect and pthread_equal() should be used
instead.
Cc: Timothy Arceri <tarceri@itsqueeze.com>
Fixes: d8d81fbc316 ("mesa: Add infrastructure for a worker thread to process GL commands.")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
* dri interface entrypoints), in which case we don't need to actually
* synchronize against ourself.
*/
- if (pthread_self() == glthread->thread)
+ if (pthread_equal(pthread_self(), glthread->thread))
return;
pthread_mutex_lock(&glthread->mutex);