예제 #1
0
파일: main.c 프로젝트: cfrost/buenos
void init_startup_thread(uint32_t arg)
{
    /* Threads have arguments for functions they run, we don't
       need any. Silence the compiler warning by using the argument. */
    arg = arg;
    process_id_t pid;

    kprintf("Mounting filesystems\n");
    vfs_mount_all();

    kprintf("Initializing networking\n");
    network_init();

    if(bootargs_get("initprog") == NULL) {
	kprintf("No initial program (initprog), dropping to fallback\n");
	init_startup_fallback();
    }

    kprintf("Starting initial program '%s'\n", bootargs_get("initprog"));

    pid = process_spawn(bootargs_get("initprog"));
    if (pid < 0)
        KERNEL_PANIC("Couldn't fit initial program in process table.\n");

    process_join(pid);
    halt_kernel();
}
예제 #2
0
파일: main.c 프로젝트: mrb852/osm
void init_startup_thread(uint32_t arg)
{
    /* Threads have arguments for functions they run, we don't
       need any. Silence the compiler warning by using the argument. */
    arg = arg;

    kprintf("Mounting filesystems\n");
    vfs_mount_all();

    kprintf("Initializing networking\n");
    network_init();

    if(bootargs_get("initprog") == NULL) {
        kprintf("No initial program (initprog), dropping to fallback\n");
        init_startup_fallback();
    }

    kprintf("Starting initial program '%s'\n", bootargs_get("initprog"));

    /* `process_start` no longer takes an executable as its argument, so we need
       to start initprog with `process_spawn`. */
    process_id_t pid = process_spawn(bootargs_get("initprog"));
    if (pid < 0) {
        KERNEL_PANIC("Couldn't fit initial program in process table.\n");
    }
    process_join(pid);

    /* The current process_start() should never return. */
    KERNEL_PANIC("Run out of initprog.\n");
}
예제 #3
0
파일: common.c 프로젝트: kazyka/OSM
void init_startup_thread(uint32_t arg)
{
  /* Threads have arguments for functions they run, we don't
     need any. Silence the compiler warning by using the argument. */
  arg = arg;

  kprintf("Mounting filesystems\n");
  vfs_mount_all();

  if(bootargs_get("initprog") == NULL) {
    kprintf("No initial program (initprog), dropping to fallback\n");
    init_startup_fallback();
  }

  kprintf("Starting initial program '%s'\n", bootargs_get("initprog"));
  // Run Process-Init for at lave process table
  process_init();
  process_spawn(bootargs_get("initprog"), NULL);
}
예제 #4
0
파일: main.c 프로젝트: Jkirstejn/OSM
void init_startup_thread(uint32_t arg)
{
    /* Threads have arguments for functions they run, we don't
       need any. Silence the compiler warning by using the argument. */
    arg = arg;

    kprintf("Mounting filesystems\n");
    vfs_mount_all();

    kprintf("Initializing networking\n");
    network_init();

    if(bootargs_get("initprog") == NULL) {
	kprintf("No initial program (initprog), dropping to fallback\n");
	init_startup_fallback();
    }

    kprintf("Starting initial program '%s'\n", bootargs_get("initprog"));

    process_run(bootargs_get("initprog"));

    /* The current process_run() should never return. */
    KERNEL_PANIC("Run out of initprog.\n");
}