mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1141692 - use an actual Atomic for nsThreadPoolNaming::mCounter; r=bsmedberg
Marking a variable as volatile is never the right thing to do when dealing with threads. Use real atomic accesses instead.
This commit is contained in:
parent
d5966b6f1c
commit
f64498b7da
@ -17,6 +17,7 @@
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -831,7 +832,7 @@ public:
|
||||
nsIThread* aThread = nullptr);
|
||||
|
||||
private:
|
||||
volatile uint32_t mCounter;
|
||||
mozilla::Atomic<uint32_t> mCounter;
|
||||
|
||||
nsThreadPoolNaming(const nsThreadPoolNaming&) = delete;
|
||||
void operator=(const nsThreadPoolNaming&) = delete;
|
||||
|
Loading…
Reference in New Issue
Block a user