Subversion Repositories HelenOS-historic

Rev

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

Rev 458 Rev 459
Line 48... Line 48...
48
#endif /* CONFIG_SMP */
48
#endif /* CONFIG_SMP */
49
 
49
 
50
#include <synch/waitq.h>
50
#include <synch/waitq.h>
51
#include <synch/spinlock.h>
51
#include <synch/spinlock.h>
52
 
52
 
53
#ifdef __TEST__
53
#ifdef CONFIG_TEST
54
#include <test.h>
54
#include <test.h>
55
#endif /* __TEST__ */
55
#endif /* CONFIG_TEST */
56
 
56
 
57
#include <mm/frame.h>
57
#include <mm/frame.h>
58
 
58
 
59
void kinit(void *arg)
59
void kinit(void *arg)
60
{
60
{
Line 115... Line 115...
115
    }
115
    }
116
#endif /* CONFIG_SMP */
116
#endif /* CONFIG_SMP */
117
 
117
 
118
    interrupts_enable();
118
    interrupts_enable();
119
 
119
 
120
#ifdef __USERSPACE__
120
#ifdef CONFIG_USERSPACE
121
    /*
121
    /*
122
     * Create the first user task.
122
     * Create the first user task.
123
     */
123
     */
124
    m = vm_create(NULL);
124
    m = vm_create(NULL);
125
    if (!m)
125
    if (!m)
Line 147... Line 147...
147
    if (!a)
147
    if (!a)
148
        panic("vm_area_create: vm_stack");
148
        panic("vm_area_create: vm_stack");
149
    vm_area_map(a, m); 
149
    vm_area_map(a, m); 
150
   
150
   
151
    thread_ready(t);
151
    thread_ready(t);
152
#endif /* __USERSPACE__ */
152
#endif /* CONFIG_USERSPACE */
153
 
153
 
154
#ifdef __TEST__
154
#ifdef CONFIG_TEST
155
    test();
155
    test();
156
#endif /* __TEST__ */
156
#endif /* CONFIG_TEST */
157
 
157
 
158
 
158
 
159
    while (1) {
159
    while (1) {
160
        thread_usleep(1000000);
160
        thread_usleep(1000000);
161
        printf("kinit... ");
161
        printf("kinit... ");