Re:Writing a Simple Linux Kernel Module
by saagarjha on Thursday November 30, 2017 @02:47PM
(#15818893)
Are you referring to macOS?
Re:Writing a Simple Linux Kernel Module
by Cyph0n on Thursday November 30, 2017 @02:50PM
(#15818912)
I think the kernel itself is called Mach. Not sure if it was written in C++ though.
Re:Writing a Simple Linux Kernel Module
by sigjuice on Thursday November 30, 2017 @03:10PM
(#15819066)
The kernel is called XNU. https://opensource.apple.com/source/xnu/ It is mainly written in C.
Re:Writing a Simple Linux Kernel Module
by self_awareness on Thursday November 30, 2017 @03:34PM
(#15819264)
The BSD part of the kernel is written in C, but IOKit, the kext framework, is written in (a subset of) C++:
http://xr.anadoxin.org/source/xref/macos-10.13-highsierra/xn...
I used to work on one. It was developed in the 90s, around the same time C++ became an ISO standard. I think most of you have used it without knowing. :)
I think OOP is natural for writing kernels and most mainstream kernels implement some kind of object system because of this. I also wrote my toy kernel in modern C++, despite that I'm "fluent" in both C and C++. So yeah, C++ kernels are here, just not in Linux land.