/* Simple init process for CubeCactusOS
 * First user-space process, similar to MINIX3 init
 */

extern int printf(const char* format, ...);

int init_main() {
    printf("CubeCactusOS init process starting...\n");
    
    /* Start system servers */
    printf("Starting system servers...\n");
    
    /* TODO: Fork and exec PM (Process Manager) */
    /* TODO: Fork and exec VFS (Virtual File System) */
    /* TODO: Fork and exec TTY driver */
    
    printf("System initialized. Ready for user programs.\n");
    
    /* Keep running */
    for(;;) {
        /* Wait for child processes */
        __asm__ __volatile__("hlt");
    }
    
    return 0;
}
