aboutsummaryrefslogtreecommitdiffstats
path: root/include/init.h
diff options
context:
space:
mode:
authorturret <turret@duck.com>2024-03-30 16:04:45 -0500
committerturret <turret@duck.com>2024-03-30 16:04:45 -0500
commit80a67b7d20393a29aa5d2cb92197f3381be7fd96 (patch)
treef0c313da5ef509e79e5067972edd91976513ce0e /include/init.h
parentf01745a2ee84f11b8cc54e37c5f7f596184ab785 (diff)
downloaddiscord-bot-skeleton-80a67b7d20393a29aa5d2cb92197f3381be7fd96.tar.gz
discord-bot-skeleton-80a67b7d20393a29aa5d2cb92197f3381be7fd96.tar.bz2
discord-bot-skeleton-80a67b7d20393a29aa5d2cb92197f3381be7fd96.zip
*: 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
Diffstat (limited to 'include/init.h')
-rw-r--r--include/init.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/include/init.h b/include/init.h
deleted file mode 100644
index 79e60f1..0000000
--- a/include/init.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __INIT_H
-#define __INIT_H
-
-typedef void (*initcall_t)(void);
-typedef initcall_t initcall_entry_t;
-
-#define __define_initcall(fn, id) \
- static initcall_t __initcall_##fn##id \
- __attribute__((used)) \
- __attribute__((section(".initcall" #id ".init"))) = fn
-
-#define l1_initcall(fn) __define_initcall(fn, 1)
-#define l2_initcall(fn) __define_initcall(fn, 2)
-#define l3_initcall(fn) __define_initcall(fn, 3)
-#define l4_initcall(fn) __define_initcall(fn, 4)
-#define l5_initcall(fn) __define_initcall(fn, 5)
-
-static inline initcall_t initcall_from_entry(initcall_entry_t *entry)
-{
- return *entry;
-}
-
-#endif