Subversion Repositories HelenOS

Rev

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

Rev 4263 Rev 4327
Line 188... Line 188...
188
        name = init.tasks[i].name;
188
        name = init.tasks[i].name;
189
        if (name[0] == 0)
189
        if (name[0] == 0)
190
            name = "<unknown>";
190
            name = "<unknown>";
191
       
191
       
192
        ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);
192
        ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);
193
        str_ncpy(namebuf, INIT_PREFIX, TASK_NAME_BUFLEN);
193
        str_cpy(namebuf, TASK_NAME_BUFLEN, INIT_PREFIX);
194
        str_ncpy(namebuf + INIT_PREFIX_LEN, name,
194
        str_cpy(namebuf + INIT_PREFIX_LEN,
195
            TASK_NAME_BUFLEN - INIT_PREFIX_LEN);
195
            TASK_NAME_BUFLEN - INIT_PREFIX_LEN, name);
196
       
196
 
197
        int rc = program_create_from_image((void *) init.tasks[i].addr,
197
        int rc = program_create_from_image((void *) init.tasks[i].addr,
198
            namebuf, &programs[i]);
198
            namebuf, &programs[i]);
199
       
199
       
200
        if ((rc == 0) && (programs[i].task != NULL)) {
200
        if ((rc == 0) && (programs[i].task != NULL)) {
201
            /*
201
            /*
Line 216... Line 216...
216
                printf("Init binary %" PRIc " not used (error %d)\n", i, rd);
216
                printf("Init binary %" PRIc " not used (error %d)\n", i, rd);
217
        }
217
        }
218
    }
218
    }
219
   
219
   
220
    /*
220
    /*
221
     * Run user tasks with small delays
221
     * Run user tasks.
222
     * to avoid intermixed klog output.
-
 
223
     *
-
 
224
     * TODO: This certainly does not guarantee
-
 
225
     *       anything, it just works in most of the
-
 
226
     *       cases. Some better way how to achieve
-
 
227
     *       nice klog output should be found.
-
 
228
     */
222
     */
229
    for (i = 0; i < init.cnt; i++) {
223
    for (i = 0; i < init.cnt; i++) {
230
        if (programs[i].task != NULL) {
224
        if (programs[i].task != NULL)
231
            program_ready(&programs[i]);
225
            program_ready(&programs[i]);
232
            thread_usleep(10000);
-
 
233
        }
-
 
234
    }
226
    }
235
   
227
   
236
#ifdef CONFIG_KCONSOLE
228
#ifdef CONFIG_KCONSOLE
237
    if (!stdin) {
229
    if (!stdin) {
238
        thread_sleep(10);
230
        thread_sleep(10);