1, thread_add_read:添加一个thread到read queue,该thread负责通过socket接受和读取从client端来的数据。 2, thread_add_write:添加一个thread到write queue,该thread负责通过socket向client端填充和写数据。 3, thread_add_timer function calls:添加一个thread到timer queue,该thread负责定时一个event,例如update和r...
THREAD_BACKGROUND:不重要,优先级最低,它通过timer来实现定时器或者事件,调用thread_add_background加入到thread_master的background 链表中等待调度。 THREAD_EXECUTE :立即执行,调用thread_execute,不加入任何链表,不用等待调度。 THREAD_UNUSED:不使用,在取消线程或者线程马上会执行时进入这个状态,并加入到unuse链表中。
链接地址1.1.10 thread_timer_remain_second () 得到指定线程的剩余时间。 链接地址1.1.11 thread_get () 若指定thread_master中的unuse链表非空,从该队列中取出一个thread,根据参数初始化并返回之。否则,给该thread_master多开辟一块空间给新的thread,根据参数初始化该thread并返回之。 链接地址1.1.12 thread_ad...
链接地址1.1.10thread_timer_remain_second () 得到指定线程的剩余时间。 链接地址1.1.11thread_get () 若指定thread_master中的unuse链表非空,从该队列中取出一个thread,根据参数初始化并返回之。否则,给该thread_master多开辟一块空间给新的thread,根据参数初始化该thread并返回之。 链接地址1.1.12thread_add_rea...
21. struct thread *tail; 22. int count; 23. }; 24. /* Master of the theads. */ 25. struct thread_master 26. { 27. struct thread_list read; 28. struct thread_list write; 29. struct thread_list timer; 30. struct thread_list event; ...
Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:01 Neighbor Count is 1, Adjacent neighbor count is 1 和前面的输出信息相比,发生了很多变化,两台路由器已经相互识别了。OSPF不象RIP一样,每隔30秒 给所有 ...
thread_fetch 编写zebra程序-线程的添加 structthread*thread_add_read(structthread_master*, int(*)(structthread*),void*,int); structthread*thread_add_write(structthread_master*, int(*)(structthread*),void*,int); structthread*thread_add_timer(structthread_master*, ...
*thread_add_write (struct thread_master *, int (*)(struct thread *), void *, int); struct thread *thread_add_timer (struct thread_master *, int (*)(struct thread *), void *, long); struct thread *thread_add_event (struct thread_master *, int (*)(struct thread *), void *,...
Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:07 Neighbor Count is 0, Adjacent neighbor count is 0 由于网络里没有其它的路由器,r1就把自己选为DR(指定路由器)了。Zebra对log处理可能有些问题,使用 ...
57、es,0notifications,0inqueueRouterefreshrequest:received0,sent0Minimumtimebetweenadvertisementrunsis0secondsForaddressfamily:IPv4UnicastCommunityattributesenttothisneighbor(both)1acceptedprefixesConnectionsestabIished2;dropped1Localhost:,Localport:179Foreignhost:,Foreignport:1029Nexthop:Readthread:onWritethread:off...