gcc hacks: busy_loop and prevent_reorder

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-08 00:00:00 +00:00
parent 6936bd6ba9
commit a06672a20d
3 changed files with 79 additions and 0 deletions

View File

@@ -18452,6 +18452,13 @@ west build -b qemu_aarch64 samples/hello_world
The build system of that project is a bit excessive / wonky. You need an edge CMake not present in Ubuntu 18.04, which I don't want to install right now, and it uses the weird custom `west` build tool frontend.
== Compilers
Argh, compilers are boring, let's learn a bit about them.
* link:userland/gcc/busy_loop.c[]: https://stackoverflow.com/questions/7083482/how-to-prevent-gcc-from-optimizing-out-a-busy-wait-loop/58758133#58758133
* link:userland/gcc/prevent_reorder.cpp[]: https://stackoverflow.com/questions/37786547/enforcing-statement-order-in-c/56865717#56865717
== About this repo
=== Supported hosts