[igt-dev] [PATCH i-g-t 05/13] lib: Add GPU power measurement

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Feb 5 14:41:10 UTC 2019


On Mon, Feb 04, 2019 at 10:25:19AM +0000, Chris Wilson wrote:
> Quoting Katarzyna Dec (2019-02-04 10:05:36)
> > On Mon, Feb 04, 2019 at 08:36:06AM +0000, Chris Wilson wrote:
> > > +     oldlocale = setlocale(LC_ALL, "C");
> > > +     v = strtod(buf, NULL);
> > > +     setlocale(LC_ALL, oldlocale);
> > Why we are first setting "C" locale and then restoring it? Is there a moment
> > during mesurement when it is changed?
> 
> No, but it may be set in the environment for pretty-printing of output.
> Thread-safety not guaranteed.

uselocale() ?

-- 
Ville Syrjälä
Intel


More information about the igt-dev mailing list