XyrisOS / xyris

The Xyris Kernel
https://xyr.is
MIT License
154 stars 11 forks source link

Use C++ Atomic Instead of GCC Builtins #246

Closed Kfeavel closed 3 years ago

Kfeavel commented 3 years ago

The C++ freestanding environment provides <atomic>, which would be a great improvement over using the GCC builtins. This would greatly simplify our mutex and semaphore code.

Kfeavel commented 3 years ago

Turns out we can't do this because we don't have <atomic> for some reason. I don't know if it's an issue with how we compile our cross compiler, but from what I can tell, we don't actually have any of the freestanding C++ standard library.

Kfeavel commented 3 years ago

Turns out <atomic> is part of Libsupcxx (https://wiki.osdev.org/Libsupcxx), so we need to add that to the docker image.

Kfeavel commented 3 years ago

Libsupcxx is very difficult to get working and the payout isn't worth the effort (yet?).

See https://github.com/panix-os/panixbuild/issues/3#issuecomment-881077783 for details.