X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/13a19dccebb7df5b78d984ce26f8f3225dd5130a..b632f535c4a6882bdca0317fb88cbe6e165f24eb:/lunaix-os/includes/lunaix/spike.h diff --git a/lunaix-os/includes/lunaix/spike.h b/lunaix-os/includes/lunaix/spike.h index ae19357..356e4b3 100644 --- a/lunaix-os/includes/lunaix/spike.h +++ b/lunaix-os/includes/lunaix/spike.h @@ -65,10 +65,13 @@ : (31 - __builtin_clz(x))) #define DO_SPIN \ - while (1) \ - ; + { \ + volatile int __infloop = 1; \ + while (__infloop) \ + ; \ + } -inline static void +inline static void noret spin() { DO_SPIN