#include "spinlock.h"
void spin_lock(spinlock_t* l){
    while(__atomic_test_and_set(&l->lock,__ATOMIC_ACQUIRE)) asm volatile("wfe");
}
void spin_unlock(spinlock_t* l){
    __atomic_clear(&l->lock,__ATOMIC_RELEASE); asm volatile("sev");
}