Update kernel.c

wrapped the entire thing in extern "C" if compiling with C++, don't know why you would though.... since it's C code anyway.