Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-06 Thread Petri Latvala
On 05/06/2014 01:04 AM, Kenneth Graunke wrote: On 05/05/2014 10:01 AM, Ian Romanick wrote: The problem I see with that is we don't know what order constructors on global objects will occur. Are we sure the contructor will be invoked before we need the locale now and in the future? These

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-06 Thread Chia-I Wu
On Tue, May 6, 2014 at 6:04 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 05/05/2014 10:01 AM, Ian Romanick wrote: On 05/04/2014 02:14 PM, Chia-I Wu wrote: On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-05 Thread Kenneth Graunke
On 05/04/2014 02:14 PM, Chia-I Wu wrote: On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Rather than calling

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-05 Thread Ian Romanick
On 05/04/2014 02:14 PM, Chia-I Wu wrote: On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Rather than calling

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-05 Thread Kenneth Graunke
On 05/05/2014 10:01 AM, Ian Romanick wrote: On 05/04/2014 02:14 PM, Chia-I Wu wrote: On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-04 Thread Chia-I Wu
On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Rather than calling glsl_initialize_strtod from other places in the compiler, it

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-02 Thread Ian Romanick
On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Rather than calling glsl_initialize_strtod from other places in the compiler, it seems better to use call_once from the strtof and strtod functions.

[Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-04-22 Thread Chia-I Wu
There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_lexer.ll | 1 + src/glsl/ir_reader.cpp | 2 ++ src/glsl/strtod.c | 36 src/glsl/strtod.h | 3