3 ms·
I'm not sure how, but I knew this was kernel code about halfway through the first function. It's strange, because I've never written any kernel code before. Is
by sp332 16y ago
I'm not sure how, but I knew this was kernel code about halfway through the first function. It's strange, because I've never written any kernel code before. Is there any dead giveaway in the first function that says, "This is code from the kernel"?
- bxr 16y agoThe things that stuck out to me were a kmalloc/kfree and a goto/label (which isn't the biggest giveaway, but the only C I've seen that used gotos and wasn't terrible code is the linux kernel, the goto is also used in the same style as they are in the kernel).