diff options
author | Emil Velikov <[email protected]> | 2017-04-20 16:24:08 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-04-21 13:39:57 +0100 |
commit | 52df318d61f4892dbbaa8f0da4787f25caf1b0d1 (patch) | |
tree | 5864f5c7f865821e9a4d0fdb9cb717a8995f7843 /src/mesa/main/glthread.c | |
parent | dd6ec78b4fc1208c9ec330642ad42361fea91678 (diff) |
mesa/glthread: correctly compare thread handles
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 <[email protected]>
Fixes: d8d81fbc316 ("mesa: Add infrastructure for a worker thread to process GL commands.")
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Plamena Manolova <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/glthread.c')
-rw-r--r-- | src/mesa/main/glthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/glthread.c b/src/mesa/main/glthread.c index c4d3f4a4349..455b829cd8d 100644 --- a/src/mesa/main/glthread.c +++ b/src/mesa/main/glthread.c @@ -265,7 +265,7 @@ _mesa_glthread_finish(struct gl_context *ctx) * 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); |