From 80a67b7d20393a29aa5d2cb92197f3381be7fd96 Mon Sep 17 00:00:00 2001 From: turret Date: Sat, 30 Mar 2024 16:04:45 -0500 Subject: *: directory changes since this project is a skeleton and not meant to clutter up the code that will actually consume the bot, i've opted to consolidate the majority of files under a single directory and minimise extra files *: move code to util/ *: move include files to include/dbs/ net: consolidate net functions into single file config: remove config --- include/dbs/subsys.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 include/dbs/subsys.h (limited to 'include/dbs/subsys.h') 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 -- cgit v1.2.3