diff --git a/src/sys/include/ubixos/init.h b/src/sys/include/ubixos/init.h new file mode 100644 index 0000000..4867abd --- /dev/null +++ b/src/sys/include/ubixos/init.h @@ -0,0 +1,10 @@ +#include + +typedef int (*intFunctionPTR)(void); + +intFunctionPTR init_tasks[] = { + static_constructors, + }; + +int init_tasksTotal = sizeof(init_tasks)/sizeof(intFunctionPTR); + diff --git a/src/sys/include/ubixos/static.h b/src/sys/include/ubixos/static.h new file mode 100644 index 0000000..94fe513 --- /dev/null +++ b/src/sys/include/ubixos/static.h @@ -0,0 +1,6 @@ +#ifndef _UBIXOS_STATIC_H +#define _UBIXOS_STATIC_H + +int static_constructors(void); + +#endif diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 5d2c229..3c7fc23 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -30,6 +30,7 @@ #include #include #include +#include /***************************************************************************************** Desc: The Kernels Descriptor table: @@ -72,7 +73,11 @@ *****************************************************************************************/ int main() { - kprint("HI!\n"); + int i = 0x0; + for (i = 0x0;i < init_tasksTotal;i++) { + if (init_tasks[i] != 0x0) + kprint("BAH!\n"); + } while (1); return(0x0); }