在一个tcpip的协议的实现中,有这么一个函数
tcpip_tcp_timer(void *arg)
{
tcp_tmr();
sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
}
当前函数又作为函数中调用的一个函数的参数,那如果我调用 sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
那是不是会陷入一个死循环中?
tcpip_tcp_timer(void *arg)
{
tcp_tmr();
sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
}
当前函数又作为函数中调用的一个函数的参数,那如果我调用 sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
那是不是会陷入一个死循环中?
我不会这几个函数,但(sys_timeout_handler)tcpip_tcp_timer像是回调函数,不会马上被调用吧。
呃,还是去查msdn吧?