There is no C++ allowed in the Linux kernel and Linus has gone on several major rants about how terrible a language it is.
There’s assembly and makefiles too
Less of a joke answer, there has been work to allow Rust bindings for drivers.
According to the github analysis, the kernel repository is:
- C 98.3%
- Assembly 0.7%
- Shell 0.4%
- Makefile 0.2%
- Python 0.2%
- Perl 0.1%
- Other 0.1%
So yeah, its basically all C, plus a tiny bit of assembly for very low level bootstrapping and some helper scripts.
Yeah but a lot of that C code has inline assembly so it’s more like 5-10% asm.
Lots of core UNIX and Linux projects are. C++ is not liked by a lot of low level FOSS community. I think Rust is going to get further into these areas. I know C++ well but prefer C. I know plenty of others who feel the same.
Then why does he write C++?
https://github.com/subsurface/subsurface/commit/1b16d570a1b6700295153bd6597b148b65000458