aboutsummaryrefslogtreecommitdiffstats
path: root/include/dbs/subsys.h
blob: 1885a8040f781d7de3a4a1c0b865fed4f673c9e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
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