packages/net/quagga/patches/008-fix-thread_cancel_event.patch
acinonyx 7fc24a1512 [packages] quagga: Refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32703 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-13 16:40:43 +00:00

28 lines
537 B
Diff

--- a/lib/thread.c
+++ b/lib/thread.c
@@ -916,6 +916,24 @@ thread_cancel_event (struct thread_maste
thread_add_unuse (m, t);
}
}
+
+ /* thread can be on the ready list too */
+ thread = m->ready.head;
+ while (thread)
+ {
+ struct thread *t;
+
+ t = thread;
+ thread = t->next;
+
+ if (t->arg == arg)
+ {
+ ret++;
+ thread_list_delete (&m->ready, t);
+ t->type = THREAD_UNUSED;
+ thread_add_unuse (m, t);
+ }
+ }
return ret;
}