Move kernel enter/exit and suspend/resume functions from proc to thread context