QNativeWifiEnginePlugin: replace a volatile bool with an atomic int
authorMarc Mutz <marc.mutz@kdab.com>
Fri, 24 Aug 2012 07:47:55 +0000 (09:47 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 29 Aug 2012 12:15:58 +0000 (14:15 +0200)
commite8963749a7ffec3096478a4104a08bff4aaf3742
tree5470bf3d5f42b33af7282a7b12df45b6e5725c44
parentb2edd830b1493ac7fb03a89ce6975769e2a3cbda
QNativeWifiEnginePlugin: replace a volatile bool with an atomic int

Since there is non-atomic data that is protected by 'triedResolve',
the (outer) read from triedResolve needs to have acquire, and the
store needs to have release semantics. The release implied by the
mutex unlock is not good enough because it only synchronises-with
the locking of the same mutex, which not all threads execute.

Change-Id: I90b62c4c0213472ecf2b95a1674a1c6c79dc3786
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/plugins/bearer/nativewifi/main.cpp