5 ms·
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.
by rjzzleep 4y 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.
- astrange 4y agoThey 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.
- Razengan 4y ago> 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 https://developer.apple.com/documentation/driverkit
- dagmx 4y agoI suspect they’re either conflating things with ObjectiveC or FireBloom (https://saaramar.github.io/iBoot_firebloom/ https://saaramar.github.io/iBoot_firebloom/) Both would sort of fit those descriptions I guess if one were to squint.
- astrange 4y agohttps://developer.apple.com/documentation/kernel/osmetaclassbase https://developer.apple.com/documentation/kernel/osmetaclass... https://developer.apple.com/documentation/kernel/osarray https://developer.apple.com/documentation/kernel/osarray That kind of thing.
- dagmx 4y agoOh interesting. Thanks for the link
- pjmlp 4y agoYou have to go back to IO Kit, Driver Kit is the new one in userspace. https://developer.apple.com/documentation/iokit 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/OperatingSystem/Part3_DriverKit/Concepts/1_Overview/Overview.htmld/index.html http://www.nextcomputers.org/NeXTfiles/Docs/NeXTStep/3.3/nd/...
- pjmlp 4y agoJust 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++.
- astrange 4y agoI'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().