Browse By Tags

Sorry, but there are no more tags available to filter with.
  • Spin-lock implementation for Aarch64 -- how to enforce acquire semantics?

    Here is a minimal C implementation of a spinlock "lock" operation using GCC's built-in atomics:

    #include <stdbool.h>
    
    void spin_lock(bool *l) {
      while (__atomic_test_and_set(l, __ATOMIC_ACQUIRE))
        ;
    }
    

    I am concerned…