Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    r6eef3c4 r221c9ec  
    116116                 * Just a beautification.
    117117                 */
    118                 thread = thread_create(kmp, NULL, TASK,
    119                     THREAD_FLAG_UNCOUNTED, "kmp");
     118                thread = thread_create(kmp, NULL, TASK, THREAD_FLAG_WIRED, "kmp", true);
    120119                if (thread != NULL) {
    121                         thread_wire(thread, &cpus[0]);
     120                        irq_spinlock_lock(&thread->lock, false);
     121                        thread->cpu = &cpus[0];
     122                        irq_spinlock_unlock(&thread->lock, false);
    122123                        thread_ready(thread);
    123124                } else
     
    133134               
    134135                for (i = 0; i < config.cpu_count; i++) {
    135                         thread = thread_create(kcpulb, NULL, TASK,
    136                             THREAD_FLAG_UNCOUNTED, "kcpulb");
     136                        thread = thread_create(kcpulb, NULL, TASK, THREAD_FLAG_WIRED, "kcpulb", true);
    137137                        if (thread != NULL) {
    138                                 thread_wire(thread, &cpus[i]);
     138                                irq_spinlock_lock(&thread->lock, false);
     139                                thread->cpu = &cpus[i];
     140                                irq_spinlock_unlock(&thread->lock, false);
    139141                                thread_ready(thread);
    140142                        } else
     
    150152       
    151153        /* Start thread computing system load */
    152         thread = thread_create(kload, NULL, TASK, THREAD_FLAG_NONE,
    153             "kload");
     154        thread = thread_create(kload, NULL, TASK, 0, "kload", false);
    154155        if (thread != NULL)
    155156                thread_ready(thread);
     
    162163                 * Create kernel console.
    163164                 */
    164                 thread = thread_create(kconsole_thread, NULL, TASK,
    165                     THREAD_FLAG_NONE, "kconsole");
     165                thread = thread_create(kconsole_thread, NULL, TASK, 0, "kconsole", false);
    166166                if (thread != NULL)
    167167                        thread_ready(thread);
     
    201201                str_cpy(namebuf + INIT_PREFIX_LEN,
    202202                    TASK_NAME_BUFLEN - INIT_PREFIX_LEN, name);
    203                
     203
    204204                /*
    205205                 * Create virtual memory mappings for init task images.
     
    236236                        init_rd((void *) init.tasks[i].paddr, init.tasks[i].size);
    237237                } else
    238                         printf("init[%zu]: Init binary load failed "
    239                             "(error %d, loader status %u)\n", i, rc,
    240                             programs[i].loader_status);
     238                        printf("init[%zu]: Init binary load failed (error %d)\n", i, rc);
    241239        }
    242240       
Note: See TracChangeset for help on using the changeset viewer.