Subversion Repositories HelenOS

Rev

Rev 1787 | Rev 1855 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1787 Rev 1854
Line 98... Line 98...
98
         * Create the kmp thread and wait for its completion.
98
         * Create the kmp thread and wait for its completion.
99
         * cpu1 through cpuN-1 will come up consecutively and
99
         * cpu1 through cpuN-1 will come up consecutively and
100
         * not mess together with kcpulb threads.
100
         * not mess together with kcpulb threads.
101
         * Just a beautification.
101
         * Just a beautification.
102
         */
102
         */
103
        if ((t = thread_create(kmp, NULL, TASK, 0, "kmp"))) {
103
        if ((t = thread_create(kmp, NULL, TASK, THREAD_FLAG_WIRED, "kmp"))) {
104
            spinlock_lock(&t->lock);
104
            spinlock_lock(&t->lock);
105
            t->flags |= X_WIRED;
-
 
106
            t->cpu = &cpus[0];
105
            t->cpu = &cpus[0];
107
            spinlock_unlock(&t->lock);
106
            spinlock_unlock(&t->lock);
108
            thread_ready(t);
107
            thread_ready(t);
109
        } else
108
        } else
110
            panic("thread_create/kmp\n");
109
            panic("thread_create/kmp\n");
Line 124... Line 123...
124
        /*
123
        /*
125
         * For each CPU, create its load balancing thread.
124
         * For each CPU, create its load balancing thread.
126
         */
125
         */
127
        for (i = 0; i < config.cpu_count; i++) {
126
        for (i = 0; i < config.cpu_count; i++) {
128
 
127
 
129
            if ((t = thread_create(kcpulb, NULL, TASK, 0, "kcpulb"))) {
128
            if ((t = thread_create(kcpulb, NULL, TASK, THREAD_FLAG_WIRED, "kcpulb"))) {
130
                spinlock_lock(&t->lock);           
129
                spinlock_lock(&t->lock);           
131
                t->flags |= X_WIRED;
-
 
132
                t->cpu = &cpus[i];
130
                t->cpu = &cpus[i];
133
                spinlock_unlock(&t->lock);
131
                spinlock_unlock(&t->lock);
134
                thread_ready(t);
132
                thread_ready(t);
135
            } else
133
            } else
136
                panic("thread_create/kcpulb\n");
134
                panic("thread_create/kcpulb\n");