Comment by rjzzleep
3 years ago
Of course it's possible in either. By the way, Mac drivers are in fact written in a subset of C++. At least they used to be, maybe that has changed.
3 years ago
Of course it's possible in either. By the way, Mac drivers are in fact written in a subset of C++. At least they used to be, maybe that has changed.
They are written in a strange subset of C++ with its own inheritance system and currency classes.
In NeXTStep they were written in ObjC, and probably should've stayed that way.
Just like UNIX kernel code is a strange subset of C.
I always find strange how "kernel C" is C, even though ISO C would bork in kernel space, but doing a similar C++ subset is pointed out as not being C++.
I'd also call kernel C strange. Mostly justified, but there's no particular reason the memory allocation call with the same behavior as malloc() in IOKit isn't named malloc().
> They are written in a strange subset of C++ with its own inheritance system and currency classes.
Can someone explain? Is there something other than DriverKit, which seems to be C++?
https://developer.apple.com/documentation/driverkit
You have to go back to IO Kit, Driver Kit is the new one in userspace.
https://developer.apple.com/documentation/iokit
Which is how the Objective-C framework for NeXTSTEP drivers used to be called,
http://www.nextcomputers.org/NeXTfiles/Docs/NeXTStep/3.3/nd/...
I suspect they’re either conflating things with ObjectiveC or FireBloom (https://saaramar.github.io/iBoot_firebloom/)
Both would sort of fit those descriptions I guess if one were to squint.
2 replies →