// --------------------------------------------------------------------------
IMPLEMENTATION [sched_wfq || sched_fp_wfq]:
-template<typename T> struct Jdb_thread_list_policy;
+template<typename T> class Jdb_thread_list_policy;
template<typename RQP>
static inline NOEXPORT
IMPLEMENTATION [sched_wfq]:
template<>
-struct Jdb_thread_list_policy<Ready_queue_wfq<Sched_context> >
+class Jdb_thread_list_policy<Ready_queue_wfq<Sched_context> >
{
+public:
static Sched_context **link(Sched_context *t)
{ return t->_ready_link; }
if (o == Kobject_dbg::end())
--o;
}
- while (!Kobject::dcast<Thread*>(Kobject::from_dbg(*o)));
- return Kobject::dcast<Thread*>(Kobject::from_dbg(*o));
+ while (!cxx::dyn_cast<Thread*>(Kobject::from_dbg(*o)));
+ return cxx::dyn_cast<Thread*>(Kobject::from_dbg(*o));
}
else
return static_cast<Thread*>(sc_iter_prev(t->sched())->context());
if (o == Kobject_dbg::end())
++o;
}
- while (!Kobject::dcast<Thread*>(Kobject::from_dbg(*o)));
- return Kobject::dcast<Thread*>(Kobject::from_dbg(*o));
+ while (!cxx::dyn_cast<Thread*>(Kobject::from_dbg(*o)));
+ return cxx::dyn_cast<Thread*>(Kobject::from_dbg(*o));
}
else
return static_cast<Thread*>(sc_iter_next(t->sched())->context());
PRIVATE static inline
void
-Jdb_thread_list::print_thread_name(Kobject_common const * o, unsigned len)
+Jdb_thread_list::print_thread_name(Kobject_common const * o, int len)
{
Jdb_kobject_name *nx = Jdb_kobject_extension::find_extension<Jdb_kobject_name>(o);
if (nx)
{
- len = min(nx->max_len(), len);
+ len = min((int)nx->max_len(), len);
printf("%-*.*s", len, len, nx->name());
}
else
{
char to[24];
int waiting_for = 0;
- unsigned plen = 0;
+ int plen = 0;
*to = '\0';
print_thread_name(t, 15);
plen += 15;
- plen += printf(" %2lx ", get_prio(t));
+ plen += printf(" %2lx ", (unsigned long)get_prio(t));
if (get_space_dbgid(t) == ~0L)
plen += printf(" ----- ");
else
- plen += printf(" %5lx ", get_space_dbgid(t));
+ plen += printf(" %5lx ", Kobject_dbg::pointer_to_id(t->space()));
if (Jdb_thread::has_partner(t))
{
if (us < 0)
us = 0;
if (us >= 1000000)
- snprintf(to, sizeof(to), " %3us", us / 1000000);
+ snprintf(to, sizeof(to), " %3ds", us / 1000000);
else if (us >= 1000)
- snprintf(to, sizeof(to), " %3um", us / 1000);
+ snprintf(to, sizeof(to), " %3dm", us / 1000);
else
- snprintf(to, sizeof(to), " %3u%c", us, Config::char_micro);
+ snprintf(to, sizeof(to), " %3d%c", us, Config::char_micro);
}
}
}
if (*c != '5')
break;
- plen += printf("(%4ld) ", stack_depth - sizeof (Thread));
+ plen += printf("(%4lu) ", stack_depth - sizeof (Thread));
}
- if (Jdb_screen::width() > plen)
+ if ((int)Jdb_screen::width() > plen)
Jdb_thread::print_state_long(t, Jdb_screen::width() - plen);
putstr("\033[K\n");
}