#define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */
static int rtq_timeout = RTQ_TIMEOUT;
+static void
+in6_rtqtimo_funneled(void *rock)
+{
+#ifdef __APPLE__
+ boolean_t funnel_state;
+ funnel_state = thread_funnel_set(network_flock, TRUE);
+ in6_rtqtimo(rock);
+#endif
+#ifdef __APPLE__
+ (void) thread_funnel_set(network_flock, FALSE);
+#endif
+}
+
static void
in6_rtqtimo(void *rock)
{
struct timeval atv;
static time_t last_adjusted_timeout = 0;
int s;
-#ifdef __APPLE__
- boolean_t funnel_state;
- funnel_state = thread_set_funneled(TRUE);
-#endif
arg.found = arg.killed = 0;
arg.rnh = rnh;
atv.tv_usec = 0;
atv.tv_sec = arg.nextstop;
- timeout(in6_rtqtimo, rock, tvtohz(&atv));
-#ifdef __APPLE__
- (void) thread_set_funneled(funnel_state);
-#endif
+ timeout(in6_rtqtimo_funneled, rock, tvtohz(&atv));
}
/*
#define MTUTIMO_DEFAULT (60*1)
+static void
+in6_mtutimo_funneled(void *rock)
+{
+#ifdef __APPLE__
+ boolean_t funnel_state;
+ funnel_state = thread_funnel_set(network_flock, TRUE);
+ in6_mtutimo(rock);
+#endif
+#ifdef __APPLE__
+ (void) thread_funnel_set(network_flock, FALSE);
+#endif
+}
+
static void
in6_mtutimo(void *rock)
{
struct mtuex_arg arg;
struct timeval atv;
int s;
-#ifdef __APPLE__
- boolean_t funnel_state;
- funnel_state = thread_set_funneled(TRUE);
-#endif
arg.rnh = rnh;
arg.nextstop = time_second + MTUTIMO_DEFAULT;
printf("invalid mtu expiration time on routing table\n");
arg.nextstop = time_second + 30; /*last resort*/
}
- timeout(in6_mtutimo, rock, tvtohz(&atv));
-#ifdef __APPLE__
- (void) thread_set_funneled(funnel_state);
-#endif
+ timeout(in6_mtutimo_funneled, rock, tvtohz(&atv));
}
#if 0