3 ms·
Linux isn't written in C either, it's written in C with a lot of language extensions. The ability to implement malloc() is just another language extension where
by astrange 6y ago
Linux isn't written in C either, it's written in C with a lot of language extensions. The ability to implement malloc() is just another language extension where the compiler promises to ignore the type aliasing issues.
Implementing memory barriers (pthread_mutex_lock()) used to be strictly speaking impossible in C too, but it's possible now that it has a defined memory model.