Export and import channels
Improve portability of the kernel