qt5base-lts/src/concurrent
Marc Mutz 935e52108d QtConcurrent::IterateKernel: fix a race on a cache variable
getticks() can be called concurrently, so accessing a non-atomic static long,
even when the assignment will produce the same value in evey case, constitutes
a data race.

Fixed by making 'useThreadCpuTime' atomic.

Since atomic long's might not be supported on all platforms, use an
atomic int instead. To avoid a narrowing conversion, and since we're
not interested in the return value of sysconf(), only whether it
succeeded, convert any non-error return value to 0 prior to storing
in the atomic.

Change-Id: Ic285f7801327b30ddcd9c24bf1ccee3112a447b1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 06:31:32 +02:00
..
doc Merge branch 'stable' into dev 2013-09-21 17:33:15 +02:00
concurrent.pro Fixup concurrent docs 2012-11-30 00:48:37 +01:00
qtconcurrent_global.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentcompilertest.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentexception.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentfilter.cpp Doc: Remove duplicated Qt Concurrent overview 2013-09-16 16:40:23 +02:00
qtconcurrentfilter.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentfilterkernel.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentfunctionwrappers.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentiteratekernel.cpp QtConcurrent::IterateKernel: fix a race on a cache variable 2013-09-26 06:31:32 +02:00
qtconcurrentiteratekernel.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentmap.cpp Doc: Remove duplicated Qt Concurrent overview 2013-09-16 16:40:23 +02:00
qtconcurrentmap.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentmapkernel.h Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
qtconcurrentmedian.h QtConcurrent::Median: add some qMove() 2013-09-13 11:47:06 +02:00
qtconcurrentreducekernel.h Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
qtconcurrentrun.cpp Doc: Remove duplicated Qt Concurrent overview 2013-09-16 16:40:23 +02:00
qtconcurrentrun.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentrunbase.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentstoredfunctioncall.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
qtconcurrentthreadengine.cpp Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qtconcurrentthreadengine.h Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00