mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-05 06:10:10 -05:00
Fix ARMv5 atomic loads from Boost dummy storage
This commit is contained in:
parent
ecb4de5bc0
commit
6d138906ec
3 changed files with 18 additions and 3 deletions
|
|
@ -949,13 +949,14 @@ Group* dummy_groups()
|
|||
* we are not allocating any dynamic memory and yet lookup can be implemented
|
||||
* without checking for groups==nullptr. This space won't ever be used for
|
||||
* insertion as the container's capacity is precisely zero.
|
||||
* Keep the storage writable: atomic loads on ARMv5 can write back through
|
||||
* compare-and-swap. constinit preserves static initialization without const.
|
||||
*/
|
||||
|
||||
static constexpr typename Group::dummy_group_type
|
||||
static constinit typename Group::dummy_group_type
|
||||
storage[Size]={typename Group::dummy_group_type(),};
|
||||
|
||||
return reinterpret_cast<Group*>(
|
||||
const_cast<typename Group::dummy_group_type*>(storage));
|
||||
return reinterpret_cast<Group*>(storage);
|
||||
}
|
||||
|
||||
template<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue