mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 1412717 - Make malloc_initialized atomic. r=njn
Interestingly, this turns single-instruction checks into two-instructions checks (at least with GCC, from one cmpb to a movl followed by a testl), but this is due to Atomic<bool> being actually backed by a uint32_t, not by the use of atomics. --HG-- extra : rebase_source : cfc0bec2113b44635120216b4abbbbbe9028b286
This commit is contained in:
parent
68626e182f
commit
7f63a01cca
@ -507,7 +507,7 @@ private:
|
||||
};
|
||||
|
||||
// Set to true once the allocator has been initialized.
|
||||
static bool malloc_initialized = false;
|
||||
static mozilla::Atomic<bool> malloc_initialized(false);
|
||||
|
||||
#if defined(XP_WIN)
|
||||
// No init lock for Windows.
|
||||
|
Loading…
Reference in New Issue
Block a user