如果代码的任何部分导致退出循环而不退出整个程序,则有一段代码我无法理解。
这是代码:
/* per-packet event loop */
while (true)
{
perf_push (PERF_EVENT_LOOP);
/* wait on tun/socket list */
multi_get_timeout (&multi, &multi.top.c2.timeval);
status = multi_tcp_wait (&multi.top, multi.mtcp);
MULTI_CHECK_SIG (&multi);
/* check on status of coarse timers */
multi_process_per_second_timers (&multi);
/* timeout? */
if (status > 0)
{
/* process the I/O which triggered select */
multi_tcp_process_io (&multi);
MULTI_CHECK_SIG (&multi);
}
else if (status == 0)
{
multi_tcp_action (&multi, NULL, TA_TIMEOUT, false);
}
perf_pop ();
}
/* shut down management interface */
uninit_management_callback_multi (&multi);
最后一行可以到达吗?