Fix issue with even stricter atomic implementation
(without even the set operator for atomics).
This commit is contained in:
1 parent
5e0c51e00c
commit
3db02c64fa
1 file changed
+3
-3
+3
-3
@@ -67,7 +67,7 @@
|
||||
* - b: Boolean indicating that the read buffer shall be updated
|
||||
*/
|
||||
#define SNAPSHOTI_FLAG(r, w, f, b) \
|
||||
( ( (r) << 4) | ((w) << 2) | ((f)) | ((b) << 6))
|
||||
((unsigned char)( ( (r) << 4) | ((w) << 2) | ((f)) | ((b) << 6)))
|
||||
#define SNAPSHOTI_R(flags) \
|
||||
(((flags) >> 4) & 0x03u)
|
||||
#define SNAPSHOTI_W(flags) \
|
||||
@@ -135,7 +135,7 @@
|
||||
for(int i = 0; i < 3; i++) { \
|
||||
M_GET_INIT_SET oplist(snap->data[i], org->data[i]); \
|
||||
} \
|
||||
snap->flags = org->flags; \
|
||||
atomic_init (&snap->flags, atomic_load(&org->flags)); \
|
||||
SNAPSHOTI_CONTRACT(snap); \
|
||||
} \
|
||||
\
|
||||
@@ -147,7 +147,7 @@
|
||||
for(int i = 0; i < 3; i++) { \
|
||||
M_GET_SET oplist(snap->data[i], org->data[i]); \
|
||||
} \
|
||||
snap->flags = org->flags; \
|
||||
atomic_init (&snap->flags, atomic_load(&org->flags)); \
|
||||
SNAPSHOTI_CONTRACT(snap); \
|
||||
} \
|
||||
\
|
||||
|
||||
Reference in new issue
Block a user