<div dir="ltr">Looks good to me :)<div><br></div><div>Reviewed-by: Plamena Manolova <<a href="mailto:plamena.manolova@intel.com">plamena.manolova@intel.com</a>></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 8:24 AM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
<br>
As mentioned in the manual - comparing pthread_t handles via the C<br>
comparison operator is incorrect and pthread_equal() should be used<br>
instead.<br>
<br>
Cc: Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com">tarceri@itsqueeze.com</a>><br>
Cc: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>><br>
Fixes: d8d81fbc316 ("mesa: Add infrastructure for a worker thread to process GL commands.")<br>
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
---<br>
src/mesa/main/glthread.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/glthread.c b/src/mesa/main/glthread.c<br>
index c4d3f4a4349..455b829cd8d 100644<br>
--- a/src/mesa/main/glthread.c<br>
+++ b/src/mesa/main/glthread.c<br>
@@ -265,7 +265,7 @@ _mesa_glthread_finish(struct gl_context *ctx)<br>
* dri interface entrypoints), in which case we don't need to actually<br>
* synchronize against ourself.<br>
*/<br>
- if (pthread_self() == glthread->thread)<br>
+ if (pthread_equal(pthread_self(), glthread->thread))<br>
return;<br>
<br>
pthread_mutex_lock(&glthread-><wbr>mutex);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.12.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>