Subversion Repositories HelenOS

Rev

Rev 4377 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4377 Rev 4692
Line 125... Line 125...
125
        thread_join(thread);
125
        thread_join(thread);
126
        thread_detach(thread);
126
        thread_detach(thread);
127
    }
127
    }
128
   
128
   
129
    if (config.cpu_count > 1) {
129
    if (config.cpu_count > 1) {
130
        count_t i;
130
        size_t i;
131
       
131
       
132
        /*
132
        /*
133
         * For each CPU, create its load balancing thread.
133
         * For each CPU, create its load balancing thread.
134
         */
134
         */
135
        for (i = 0; i < config.cpu_count; i++) {
135
        for (i = 0; i < config.cpu_count; i++) {
Line 138... Line 138...
138
                spinlock_lock(&thread->lock);
138
                spinlock_lock(&thread->lock);
139
                thread->cpu = &cpus[i];
139
                thread->cpu = &cpus[i];
140
                spinlock_unlock(&thread->lock);
140
                spinlock_unlock(&thread->lock);
141
                thread_ready(thread);
141
                thread_ready(thread);
142
            } else
142
            } else
143
                printf("Unable to create kcpulb thread for cpu" PRIc "\n", i);
143
                printf("Unable to create kcpulb thread for cpu" PRIs "\n", i);
144
        }
144
        }
145
    }
145
    }
146
#endif /* CONFIG_SMP */
146
#endif /* CONFIG_SMP */
147
   
147
   
148
    /*
148
    /*
Line 166... Line 166...
166
    interrupts_enable();
166
    interrupts_enable();
167
   
167
   
168
    /*
168
    /*
169
     * Create user tasks, load RAM disk images.
169
     * Create user tasks, load RAM disk images.
170
     */
170
     */
171
    count_t i;
171
    size_t i;
172
    program_t programs[CONFIG_INIT_TASKS];
172
    program_t programs[CONFIG_INIT_TASKS];
173
   
173
   
174
    for (i = 0; i < init.cnt; i++) {
174
    for (i = 0; i < init.cnt; i++) {
175
        if (init.tasks[i].addr % FRAME_SIZE) {
175
        if (init.tasks[i].addr % FRAME_SIZE) {
176
            printf("init[%" PRIc "].addr is not frame aligned\n", i);
176
            printf("init[%" PRIs "].addr is not frame aligned\n", i);
177
            continue;
177
            continue;
178
        }
178
        }
179
       
179
       
180
        /*
180
        /*
181
         * Construct task name from the 'init:' prefix and the
181
         * Construct task name from the 'init:' prefix and the
Line 211... Line 211...
211
        } else {
211
        } else {
212
            /* RAM disk image */
212
            /* RAM disk image */
213
            int rd = init_rd((rd_header_t *) init.tasks[i].addr, init.tasks[i].size);
213
            int rd = init_rd((rd_header_t *) init.tasks[i].addr, init.tasks[i].size);
214
           
214
           
215
            if (rd != RE_OK)
215
            if (rd != RE_OK)
216
                printf("Init binary %" PRIc " not used (error %d)\n", i, rd);
216
                printf("Init binary %" PRIs " not used (error %d)\n", i, rd);
217
        }
217
        }
218
    }
218
    }
219
   
219
   
220
    /*
220
    /*
221
     * Run user tasks.
221
     * Run user tasks.