3 ms·
I didn't spend much time looking at it, but to me the code looks more like C than C++ lol https://fuchsia.googlesource.com/zircon/+/master/kernel/include/kerne
by kevindqc 8y ago
I didn't spend much time looking at it, but to me the code looks more like C than C++ lol
https://fuchsia.googlesource.com/zircon/+/master/kernel/include/kernel/thread.h https://fuchsia.googlesource.com/zircon/+/master/kernel/incl...
https://fuchsia.googlesource.com/zircon/+/master/kernel/kernel/thread.cpp https://fuchsia.googlesource.com/zircon/+/master/kernel/kern...
Even things like SpinLock, which I was expecting to use class for RAII, looks like it was implemented using C, then with a C++ wrapper:
https://fuchsia.googlesource.com/zircon/+/master/kernel/include/kernel/spinlock.h https://fuchsia.googlesource.com/zircon/+/master/kernel/incl...
So to me (I'm no C/C++/Kernel/etc. expert) it looks like they are writing the kernel mostly in C, with C++ goodies sprinkled in some places, where it's useful (ie: RAII for spinlock guard)
- maxlybbert 8y agoThat’s because Google’s style guide is very restrictive.