Browse Source

fix(lock): lock not properly locked

greatbridf 11 months ago
parent
commit
1dacf49c2a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/types/lock.hpp

+ 1 - 1
include/types/lock.hpp

@@ -8,7 +8,7 @@ inline void spin_lock(uint32_t volatile* lock_addr)
         "%=:\n\t\
          movl $1, %%eax\n\t\
          xchgl %%eax, (%0)\n\t\
-         test $0, %%eax\n\t\
+         cmp $0, %%eax\n\t\
          jne %=b\n\t\
         "
         :