From 2e009f2f26b0a00ad86dddca933bc51a9bb53858 Mon Sep 17 00:00:00 2001 From: paulo Date: Tue, 2 Feb 2010 12:02:31 +0000 Subject: Change nexus priorities to more closely resemble the originals. --- bgpd/bgp_main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bgpd/bgp_main.c') diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 05868896..3ad9e0c3 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -84,8 +84,8 @@ void sigusr2 (void); static void bgp_exit (int); static void init_second_stage(int pthreads); static void bgp_in_thread_init(void); -static qtime_mono_t routing_event_hook(void); -static qtime_mono_t bgp_event_hook(void); +static qtime_mono_t routing_event_hook(enum qpn_priority priority); +static qtime_mono_t bgp_event_hook(enum qpn_priority priority); static void sighup_action(mqueue_block mqb, mqb_flag_t flag); static void sighup_enqueue(void); static void sigterm_action(mqueue_block mqb, mqb_flag_t flag); @@ -618,12 +618,12 @@ bgp_in_thread_init(void) /* legacy threads */ static qtime_mono_t -routing_event_hook(void) +routing_event_hook(enum qpn_priority priority) { struct thread thread; qtime_mono_t event_wait; - while (thread_fetch_event (master, &thread, &event_wait)) + while (thread_fetch_event (priority, master, &thread, &event_wait)) thread_call (&thread); return event_wait; @@ -631,9 +631,10 @@ routing_event_hook(void) /* BGP local queued events */ static qtime_mono_t -bgp_event_hook(void) +bgp_event_hook(enum qpn_priority priority) { - bgp_connection_queue_process(); + if (priority >= qpn_pri_fourth) + bgp_connection_queue_process(); return 0; } -- cgit v1.2.3