Initial commit

This commit is contained in:
2025-09-15 16:08:41 +02:00
commit 19226ca82a
8 changed files with 156 additions and 0 deletions

22
mod.c Normal file
View File

@@ -0,0 +1,22 @@
#include "mod.h"
#include <stdio.h>
extern struct mod_t __start___mod_list[]; // note: [] not single object
extern struct mod_t __stop___mod_list[];
static inline size_t mod_count(void) {
return (size_t)(__stop___mod_list - __start___mod_list);
}
// mod_register(mod_begin, mod_begin);
void run_mods(void) {
printf("Running mods! %lu\n", mod_count());
// mod_t* first = &mod_mod_begin;
//
// mod_t* it = first + 1;
//
// it->fn();
// for (mod_t* it = first + 1; ieiieieieieie
}