Added a "net_timer" KDL command that dumps all network timers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22923 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fb431b443b
commit
63d2ded05d
@ -505,6 +505,25 @@ is_timer_active(net_timer *timer)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dump_timer(int argc, char **argv)
|
||||
{
|
||||
kprintf("timer hook data due in\n");
|
||||
|
||||
struct net_timer *timer = NULL;
|
||||
while (true) {
|
||||
timer = (net_timer *)list_get_next_item(&sTimers, timer);
|
||||
if (timer == NULL)
|
||||
break;
|
||||
|
||||
kprintf("%p %p %p %Ld\n", timer, timer->hook, timer->data,
|
||||
timer->due > 0 ? timer->due - system_time() : -1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
init_timers(void)
|
||||
{
|
||||
@ -528,6 +547,9 @@ init_timers(void)
|
||||
goto err2;
|
||||
}
|
||||
|
||||
add_debugger_command("net_timer", dump_timer,
|
||||
"Lists all active network timer");
|
||||
|
||||
return resume_thread(sTimerThread);
|
||||
|
||||
err1:
|
||||
|
Loading…
Reference in New Issue
Block a user