|
Lines 116-123
Link Here
|
| 116 |
TAILQ_FOREACH(thread, &_thread_list, tle) { |
116 |
TAILQ_FOREACH(thread, &_thread_list, tle) { |
| 117 |
if (thread != curthread) { |
117 |
if (thread != curthread) { |
| 118 |
THR_THREAD_LOCK(curthread, thread); |
118 |
THR_THREAD_LOCK(curthread, thread); |
| 119 |
if (thread->state != PS_DEAD && |
119 |
if (thread->state != PS_DEAD) |
| 120 |
!(thread->flags & THR_FLAGS_SUSPENDED)) |
|
|
| 121 |
thread->flags |= THR_FLAGS_NEED_SUSPEND; |
120 |
thread->flags |= THR_FLAGS_NEED_SUSPEND; |
| 122 |
THR_THREAD_UNLOCK(curthread, thread); |
121 |
THR_THREAD_UNLOCK(curthread, thread); |
| 123 |
} |
122 |
} |
|
Lines 162-167
Link Here
|
| 162 |
{ |
161 |
{ |
| 163 |
uint32_t tmp; |
162 |
uint32_t tmp; |
| 164 |
|
163 |
|
|
|
164 |
if(thread->state != PS_DEAD) |
| 165 |
thread->flags |= THR_FLAGS_NEED_SUSPEND; |
| 166 |
|
| 165 |
while (thread->state != PS_DEAD && |
167 |
while (thread->state != PS_DEAD && |
| 166 |
!(thread->flags & THR_FLAGS_SUSPENDED)) { |
168 |
!(thread->flags & THR_FLAGS_SUSPENDED)) { |
| 167 |
thread->flags |= THR_FLAGS_NEED_SUSPEND; |
169 |
thread->flags |= THR_FLAGS_NEED_SUSPEND; |