Пример #1
0
void start_kernel(void)
{
    seg_t base, end;

/* We set the idle task as #0, and init_task() will be task #1 */

    sched_init();	/* This block of functions don't need console */
    setup_arch(&base, &end);
    mm_init(base, end);
    buffer_init();
    inode_init();
    init_IRQ();
    tty_init();

    init_console();

#if (CONFIG_BOGOMIPS == 0)
    calibrate_delay();
#endif

    device_setup();

#ifdef CONFIG_SOCKET
    sock_init();
#endif

    fs_init();

    mm_stat(base, end);
    printk("ELKS version %s\n", system_utsname.release);

    kfork_proc(init_task);
    wake_up_process(&task[1]);

    /*
     * We are now the idle task. We won't run unless no other process can run.
     */
    while (1) {
        schedule();

#ifdef CONFIG_IDLE_HALT
        idle_halt ();
#endif
    }
}
Пример #2
0
void start_kernel(void)
{
    seg_t base, end;

/* We set the scheduler up as task #0, and this as task #1 */

    setup_arch(&base, &end);
    mm_init(base, end);
    init_IRQ();
    init_console();

#if 0
    calibrate_delay();
#endif

    setup_mm();			/* Architecture specifics */
    tty_init();
    buffer_init();

#ifdef CONFIG_SOCKET
    sock_init();
#endif

    device_setup();
    inode_init();
    fs_init();
    sched_init();

    printk("ELKS version %s\n", system_utsname.release);

    task[0].t_kstackm = KSTACK_MAGIC;
    task[0].next_run = task[0].prev_run = &task[0];
    kfork_proc(&task[1], init_task);

    /* 
     * We are now the idle task. We won't run unless no other process can run.
     */
    while (1){
        schedule();
    }

}
Пример #3
0
void sched_init(void)
{
    register struct task_struct *t = task;

/*
 *	Mark tasks 0-(MAX_TASKS-1) as not in use.
 */
    do {
	t->state = TASK_UNUSED;
    } while (++t < &task[MAX_TASKS]);

/*
 *	Now create task 0 to be ourself.
 */
    kfork_proc(NULL);

    t = task;
    t->state = TASK_RUNNING;
    t->next_run = t->prev_run = t;
}