Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-15 Thread Eric Engestrom
On Thursday, 2017-06-15 14:24:55 +0300, Grazvydas Ignotas wrote: > On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom > wrote: > > If the detections methods ever become able to return different results > > for different threads, the if chain might make threads go back and forth > > between invalid and

Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-15 Thread Grazvydas Ignotas
On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom wrote: > If the detections methods ever become able to return different results > for different threads, the if chain might make threads go back and forth > between invalid and valid platforms. > Solve this by doing the detection in a local var and on

Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-02 Thread Emil Velikov
On 1 June 2017 at 15:52, Grazvydas Ignotas wrote: > On Thu, Jun 1, 2017 at 4:23 PM, Emil Velikov wrote: >> Hi guys, >> >> On 1 June 2017 at 12:56, Grazvydas Ignotas wrote: >>> On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom >>> wrote: If the detections methods ever become able to return dif

Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-01 Thread Grazvydas Ignotas
On Thu, Jun 1, 2017 at 4:23 PM, Emil Velikov wrote: > Hi guys, > > On 1 June 2017 at 12:56, Grazvydas Ignotas wrote: >> On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom >> wrote: >>> If the detections methods ever become able to return different results >>> for different threads, the if chain migh

Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-01 Thread Emil Velikov
Hi guys, On 1 June 2017 at 12:56, Grazvydas Ignotas wrote: > On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom > wrote: >> If the detections methods ever become able to return different results >> for different threads, the if chain might make threads go back and forth >> between invalid and valid

Re: [Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-01 Thread Grazvydas Ignotas
On Thu, Jun 1, 2017 at 2:15 PM, Eric Engestrom wrote: > If the detections methods ever become able to return different results > for different threads, the if chain might make threads go back and forth > between invalid and valid platforms. > Solve this by doing the detection in a local var and on

[Mesa-dev] [PATCH mesa 2/2] egl/display: make platform detection thread-safe

2017-06-01 Thread Eric Engestrom
If the detections methods ever become able to return different results for different threads, the if chain might make threads go back and forth between invalid and valid platforms. Solve this by doing the detection in a local var and only overwriting the global one at the end, if no other thread ha