Turning it inside out By noting that init and job are separate, we can do: struct task { char *name; void *arg; int (*init)(void *arg, struct task *t); int (*job)(void *arg, struct task *t); unsigned long nextrun, period; }; struct task task_temperature = { ... }; DECLARE_TASK(task_temperature); /* creates entry in ELF section */ The code above can be made better (please suggest), but: It uses a single stack You can look at (or change) task status You can add extra info in the same structure. Even if some experts dislike this, some love it like I do And we can add preemption later (with a single stack)