You can get the Arduino kernel - aka krnl - in several ways
github http://github.com/jdn-aau/krnl
krnl.h
krnl.c
krnl.zip
You just download the zip file and install it in Arduino IDE by:
Sketch -> Include Library -> Add .ZIP library