In this case it actually is related. That function is declared and defined; only on 64bit builds however
Because 32bit builds have officially been dropped I’m not sure if this is a “patches are welcome” situation or not. That uuid field needs to be 64bits and looks like updating it needs to be atomic… might be difficult to do on a 32bit arch but haven’t researched in depth.
It is, even though we no longer do CI on 32 bit, regressions like this can happen (also DNA regressions we didn’t pick up on) patches are welcome, same way we accept fixes for platforms we don’t ship our selves (like haiku-os).
in ./source/blender/makesdna/DNA_session_uuid_types.h:
typedef struct SessionUUID {
/* Never access directly, as it might cause a headache when more bits are needed: if the field
* is used directly it will not be easy to find all places where partial access is used. */
uint64_t uuid_;
} SessionUUID;
and that uint64_t nature is rather deeply entangled in ./source/blender/blenlib/{BLI_session_uuid.h,intern/session_uuid.c}.
Hence, while intern/atomic/atomic_ops.h provides register size agnostic atomic functions, it would involve quite some churn in the former modules to implement the uuid this way.
If i were looking to work around this issue, i’d probably add the missing atomic functions and implement them with some kind of lock (they seem like relatively quick operations, spinlock will probably do the trick)
That’ll be a little trickier, the atomics library is currently a header only C library, while adding a C++ backend surely isn’t impossible but it’ll be more work to keep it working for C code.
Another option is given that most of these are lifted from jemalloc is see if they have a solution already.
Even jemalloc comes with c11 atomics, while the generic gcc and msvc variants take a significantly more advanced approach nowadays (macro based function generation).