Rev 1005 | Rev 1026 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1005 | Rev 1025 | ||
|---|---|---|---|
| Line 35... | Line 35... | ||
| 35 | #include <synch/spinlock.h> |
35 | #include <synch/spinlock.h> |
| 36 | #include <arch.h> |
36 | #include <arch.h> |
| 37 | #include <panic.h> |
37 | #include <panic.h> |
| 38 | #include <adt/list.h> |
38 | #include <adt/list.h> |
| 39 | #include <ipc/ipc.h> |
39 | #include <ipc/ipc.h> |
| 40 | #include <ipc/ns.h> |
- | |
| 41 | #include <memstr.h> |
40 | #include <memstr.h> |
| 42 | 41 | ||
| 43 | #include <elf.h> |
42 | #include <elf.h> |
| 44 | 43 | ||
| 45 | SPINLOCK_INITIALIZE(tasks_lock); |
44 | SPINLOCK_INITIALIZE(tasks_lock); |
| Line 108... | Line 107... | ||
| 108 | thread_t *t; |
107 | thread_t *t; |
| 109 | task_t *task; |
108 | task_t *task; |
| 110 | 109 | ||
| 111 | as = as_create(0); |
110 | as = as_create(0); |
| 112 | 111 | ||
| 113 | rc = elf_load((elf_header_t *) config.init_addr, as); |
112 | rc = elf_load((elf_header_t *) program_addr, as); |
| 114 | if (rc != EE_OK) { |
113 | if (rc != EE_OK) { |
| 115 | as_free(as); |
114 | as_free(as); |
| 116 | return NULL; |
115 | return NULL; |
| 117 | } |
116 | } |
| 118 | 117 | ||
| 119 | task = task_create(as); |
118 | task = task_create(as); |
| 120 | t = thread_create(uinit, (void *)((elf_header_t *) config.init_addr)->e_entry, |
119 | t = thread_create(uinit, (void *)((elf_header_t *)program_addr)->e_entry, |
| 121 | task, THREAD_USER_STACK); |
120 | task, THREAD_USER_STACK); |
| 122 | 121 | ||
| 123 | /* |
122 | /* |
| 124 | * Create the data as_area. |
123 | * Create the data as_area. |
| 125 | */ |
124 | */ |