move preemptKernel definition