Could we get instructions for atomic operations into GNU lightning? At the moment, the only possibility to synchronize GNU lightning code in multi-threaded environments is to call external C code (which can be slow).
I'm thinking of a set of instructions that could be used to implement something in the scope of C's <stdatomic.h>. In order to implement this, one can take the assembly that GCC generates on the various architectures (see also https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html).