diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2017-04-20 16:24:08 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-04-24 13:13:22 +0100 |
commit | 612fc14aab46e85452915d6e77fffee7bb94cfe5 (patch) | |
tree | b15480069900db28441f3d195f0ad84995dc8225 /src/mesa | |
parent | 8aa9aa6a5f86891c106bcc95d88377af1bfa0406 (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 <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>
(cherry picked from commit 52df318d61f4892dbbaa8f0da4787f25caf1b0d1)
Diffstat (limited to 'src/mesa')
-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); |