Brought dump_port_info() into shape, added output of port_entry::total_count.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10733 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-01-14 20:45:18 +00:00
parent 6158f7d53a
commit 8b74caaae0
+12 -10
View File
@@ -47,7 +47,7 @@ struct port_entry {
const char *name;
sem_id read_sem;
sem_id write_sem;
int32 total_count;
int32 total_count; // messages read from port since creation
struct list msg_queue;
};
@@ -230,15 +230,17 @@ dump_port_list(int argc, char **argv)
static void
_dump_port_info(struct port_entry *port)
{
int32 cnt;
dprintf("PORT: %p\n", port);
dprintf("name: '%s'\n", port->name);
dprintf("owner: 0x%lx\n", port->owner);
dprintf("capacity: %ld\n", port->capacity);
get_sem_count(port->read_sem, &cnt);
dprintf("read_sem: %ld\n", cnt);
get_sem_count(port->write_sem, &cnt);
dprintf("write_sem: %ld\n", cnt);
int32 count;
dprintf("PORT: %p\n", port);
dprintf(" name: \"%s\"\n", port->name);
dprintf(" owner: %#lx\n", port->owner);
dprintf(" capacity: %ld\n", port->capacity);
get_sem_count(port->read_sem, &count);
dprintf(" read sem count: %ld\n", count);
get_sem_count(port->write_sem, &count);
dprintf(" write sem count: %ld\n", count);
dprintf(" total count: %ld\n", port->total_count);
}