I\'ve tried to implement a growing array (list) in the kernel. I made the following implementation for add2list:
typedef struct { int channel_id; } privat