]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/abi/l4_types-debug.cpp
update
[l4.git] / kernel / fiasco / src / abi / l4_types-debug.cpp
1 IMPLEMENTATION [debug]:
2
3 #include <cstdio>
4 #include "simpleio.h"
5
6 PUBLIC void L4_timeout::print() const
7 {
8   printf("m=%ld e=%ld", man(), exp());
9 }
10
11 PUBLIC void L4_timeout_pair::print() const
12 {
13   printf("snd: ");
14   snd.print();
15   printf(" rcv: ");
16   rcv.print();
17 }
18
19 PUBLIC
20 void
21 Utcb::print() const
22 {
23   puts("Values:");
24   for (unsigned i = 0; i < Max_words; ++i)
25     printf("%2d:%16lx%c", i, values[i], !((i+1) % 4) ? '\n' : ' ');
26   if (Max_words % 4)
27     puts("");
28   printf("Reserved:   %16lx\n", utcb_addr);
29
30   printf("Buffers:  desc=%16lx\n", buf_desc.raw());
31   for (unsigned i = 0; i < sizeof(buffers) / sizeof(buffers[0]); ++i)
32     printf("%2d:%16lx%c", i, buffers[i], !((i+1) % 4) ? '\n' : ' ');
33   if ((sizeof(buffers) / sizeof(buffers[0])) % 4)
34     puts("");
35
36   printf("Xfer timeout: ");
37   xfer.print();
38   puts("");
39
40   printf("Error:       %16lx\n", error.raw());
41   printf("User values: %16lx %16lx %16lx\n", user[0], user[1], user[2]);
42 }
43