3dcb9f5e794e4a028e46b93af577c3a6be40b8ed
[feed/routing.git] / patches / 008-fix-thread_cancel_event.patch
1 --- a/lib/thread.c
2 +++ b/lib/thread.c
3 @@ -916,6 +916,24 @@ thread_cancel_event (struct thread_maste
4 thread_add_unuse (m, t);
5 }
6 }
7 +
8 + /* thread can be on the ready list too */
9 + thread = m->ready.head;
10 + while (thread)
11 + {
12 + struct thread *t;
13 +
14 + t = thread;
15 + thread = t->next;
16 +
17 + if (t->arg == arg)
18 + {
19 + ret++;
20 + thread_list_delete (&m->ready, t);
21 + t->type = THREAD_UNUSED;
22 + thread_add_unuse (m, t);
23 + }
24 + }
25 return ret;
26 }
27