Modernize atomics
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
This commit is contained in:
parent
8870f43d74
commit
8e128726f0
58 changed files with 650 additions and 639 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include "core/templates/hash_map.h"
|
||||
#include "core/templates/list.h"
|
||||
#include "core/templates/map.h"
|
||||
#include "core/templates/safe_refcount.h"
|
||||
#include "core/templates/set.h"
|
||||
#include "core/templates/vmap.h"
|
||||
#include "core/variant/callable_bind.h"
|
||||
|
|
@ -485,7 +486,7 @@ private:
|
|||
|
||||
friend class Reference;
|
||||
bool type_is_reference = false;
|
||||
uint32_t instance_binding_count = 0;
|
||||
SafeNumeric<uint32_t> instance_binding_count;
|
||||
void *_script_instance_bindings[MAX_SCRIPT_INSTANCE_BINDINGS];
|
||||
|
||||
Object(bool p_reference);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue