Made waiting for console and filesystem progresive
@@ -41,6 +41,7 @@ void main_initthr(void *unused)
int xcount = 0;
char *cmdline = syspage->arg, *end;
char *argv[32], *arg, *argend;
+ time_t sleep;
/* Enable locking and multithreading related mechanisms */
_hal_start();
@@ -119,14 +120,23 @@ void main_initthr(void *unused)
proc_execve(last, last->cmdline, argv, NULL);
}
+ sleep = 10000;
proc_fileGet(0, 1, &oid, 0, NULL);
while (proc_write(oid, 0, "", 1) < 0) {
proc_fileGet(0, 1, &oid, 0, NULL);
- proc_threadSleep(10000);
+ proc_threadSleep(sleep);
+
+ if ((sleep *= 2) > 2000000)
+ sleep = 2000000;
}
- while (proc_lookup("/", &oid) < 0)
- proc_threadSleep(10000);
+ sleep = 10000;
+ while (proc_lookup("/", &oid) < 0) {
+ proc_threadSleep(sleep);
+
+ if ((sleep *= 2) > 2000000)
+ sleep = 2000000;
+ }
/* Initialize system */
proc_execle(NULL, "/bin/init", "init", NULL, NULL);
