9 #include "jdb_module.h"
10 #include "jdb_screen.h"
11 #include "jdb_kobject.h"
13 #include "static_init.h"
16 class Jdb_ipc_gate : public Jdb_kobject_handler
19 Jdb_ipc_gate() FIASCO_INIT;
23 Jdb_ipc_gate::Jdb_ipc_gate()
24 : Jdb_kobject_handler(Ipc_gate_obj::static_kobj_type)
26 Jdb_kobject::module()->register_handler(this);
31 Jdb_ipc_gate::follow_link(Kobject *o)
33 Ipc_gate_obj *g = Kobject::dcast<Ipc_gate_obj *>(o);
34 return static_cast<Kobject*>(g->thread());
39 Jdb_ipc_gate::show_kobject(Kobject *, int)
44 Jdb_ipc_gate::show_kobject_short(char *buf, int max, Kobject *o)
46 Ipc_gate_obj *g = Kobject::dcast<Ipc_gate_obj*>(o);
50 return snprintf(buf, max, " L=%s%08lx\033[0m D=%lx",
51 (g->id() & 3) ? JDB_ANSI_COLOR(lightcyan) : "",
52 g->id(), g->thread() ? g->thread()->dbg_id() : 0);
57 Jdb_ipc_gate::kobject_type() const
59 return JDB_ANSI_COLOR(magenta) "Gate" JDB_ANSI_COLOR(default);
62 static Jdb_ipc_gate jdb_space INIT_PRIORITY(JDB_MODULE_INIT_PRIO);