From: Paul Jakma Date: Sat, 9 Jan 2010 14:11:02 +0000 (+0000) Subject: ospfd: the maxage_lsa_remover should check whether it needs to yield the cpu X-Git-Tag: frr-2.0-rc1~2120 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=94b6bfd28357dfa5a4f478b7393522816976c0b0;p=matthieu%2Ffrr.git ospfd: the maxage_lsa_remover should check whether it needs to yield the cpu --- diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index dbf0f41737..0c23909bd8 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -2911,7 +2911,11 @@ ospf_maxage_lsa_remover (struct thread *thread) reschedule = 1; continue; } - + + /* TODO: maybe convert this function to a work-queue */ + if (thread_should_yield (thread)) + OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0); + /* Remove LSA from the LSDB */ if (CHECK_FLAG (lsa->flags, OSPF_LSA_SELF)) if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))