Kernel call thunks and cleanup on exports.