Subversion Repositories HelenOS-historic

Compare Revisions

Regard whitespace Rev 716 → Rev 717

/kernel/trunk/generic/src/main/kinit.c
69,13 → 69,11
void kinit(void *arg)
{
thread_t *t;
#ifdef CONFIG_USERSPACE
as_t *as;
as_area_t *a;
__address frame;
index_t pfn[1];
task_t *u;
#endif
 
interrupts_disable();
 
139,7 → 137,7
 
interrupts_enable();
 
#ifdef CONFIG_USERSPACE
if (config.init_size > 0) {
/*
* Create the first user task.
*/
160,12 → 158,9
if (!a)
panic("as_area_create: text\n");
 
// FIXME: Better way to initialize static code/data
frame = frame_alloc(0, ONE_FRAME, NULL);
 
if (config.init_size > 0)
memcpy((void *) PA2KA(frame), (void *) config.init_addr, config.init_size < PAGE_SIZE ? config.init_size : PAGE_SIZE);
else
memcpy((void *) PA2KA(frame), (void *) utext, utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE);
pfn[0] = frame / FRAME_SIZE;
as_area_load_mapping(a, pfn);
178,7 → 173,7
panic("as_area_create: stack\n");
thread_ready(t);
#endif /* CONFIG_USERSPACE */
}
 
#ifdef CONFIG_TEST
test();