diff options
Diffstat (limited to 'include/dbs/subsys.h')
-rw-r--r-- | include/dbs/subsys.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dbs/subsys.h b/include/dbs/subsys.h new file mode 100644 index 0000000..1885a80 --- /dev/null +++ b/include/dbs/subsys.h @@ -0,0 +1,12 @@ +#ifndef __SUBSYS_H +#define __SUBSYS_H + +int __impl_start_subsystem(char *name, int (*fn)(void)); +#define start_subsystem(fn) __impl_start_subsystem(#fn, fn) +#define declare_subsystem(fn) \ + void subsys_start_##fn(void) { \ + start_subsystem(fn); \ + } \ + l5_initcall(subsys_start_##fn) + +#endif |