Make version counter in mlist_t volatile
The log manager is the only one that uses the mlist_t versioned list. The counter that keeps track of the version number was not modified using atomic operations meaning that the compiler is free to optimize away parts of the lock-free versioning mechanism that uses it. To prevent this optimization, the variable is declared volatile. A rewrite is direly needed but it cannot be done in 2.2.
This commit is contained in:
parent
f5110209f7
commit
33fa9b26fe
@ -32,7 +32,7 @@ typedef struct mlist_st
|
||||
bool mlist_deleted;
|
||||
size_t mlist_nodecount;
|
||||
size_t mlist_nodecount_max; /**< size limit. 0 == no limit */
|
||||
size_t mlist_versno;
|
||||
volatile size_t mlist_versno;
|
||||
bool mlist_flat;
|
||||
mlist_node_t* mlist_first;
|
||||
mlist_node_t* mlist_last;
|
||||
|
Loading…
x
Reference in New Issue
Block a user