Rev 1341 | Rev 1581 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1341 | Rev 1576 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | void kinit(void *arg) |
80 | void kinit(void *arg) |
81 | { |
81 | { |
82 | thread_t *t; |
82 | thread_t *t; |
83 | task_t *utask; |
83 | task_t *utask; |
84 | 84 | ||
- | 85 | /* |
|
- | 86 | * Detach kinit as nobody will call thread_join_timeout() on it. |
|
- | 87 | */ |
|
- | 88 | thread_detach(THREAD); |
|
- | 89 | ||
85 | interrupts_disable(); |
90 | interrupts_disable(); |
86 | 91 | ||
87 | #ifdef CONFIG_SMP |
92 | #ifdef CONFIG_SMP |
88 | if (config.cpu_count > 1) { |
93 | if (config.cpu_count > 1) { |
89 | /* |
94 | /* |
Line 96... | Line 101... | ||
96 | spinlock_lock(&t->lock); |
101 | spinlock_lock(&t->lock); |
97 | t->flags |= X_WIRED; |
102 | t->flags |= X_WIRED; |
98 | t->cpu = &cpus[0]; |
103 | t->cpu = &cpus[0]; |
99 | spinlock_unlock(&t->lock); |
104 | spinlock_unlock(&t->lock); |
100 | thread_ready(t); |
105 | thread_ready(t); |
101 | waitq_sleep(&kmp_completion_wq); |
- | |
102 | } |
106 | } |
- | 107 | else { |
|
103 | else panic("thread_create/kmp\n"); |
108 | panic("thread_create/kmp\n"); |
- | 109 | } |
|
- | 110 | thread_join(t); |
|
104 | } |
111 | } |
105 | #endif /* CONFIG_SMP */ |
112 | #endif /* CONFIG_SMP */ |
106 | /* |
113 | /* |
107 | * Now that all CPUs are up, we can report what we've found. |
114 | * Now that all CPUs are up, we can report what we've found. |
108 | */ |
115 | */ |