Rev 4173 | Rev 4253 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4173 | Rev 4226 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | #include <event.h> |
45 | #include <event.h> |
46 | #include <errno.h> |
46 | #include <errno.h> |
47 | 47 | ||
48 | #define NAME "klog" |
48 | #define NAME "klog" |
49 | 49 | ||
50 | #define KLOG_SIZE PAGE_SIZE |
50 | #define KLOG_SIZE PAGE_SIZE |
- | 51 | #define KLOG_LENGTH (KLOG_SIZE / sizeof(wchar_t)) |
|
51 | 52 | ||
52 | /* Pointer to klog area */ |
53 | /* Pointer to klog area */ |
53 | static char *klog; |
54 | static wchar_t *klog; |
54 | 55 | ||
55 | static void interrupt_received(ipc_callid_t callid, ipc_call_t *call) |
56 | static void interrupt_received(ipc_callid_t callid, ipc_call_t *call) |
56 | { |
57 | { |
57 | async_serialize_start(); |
58 | async_serialize_start(); |
58 | 59 | ||
59 | size_t klog_start = (size_t) IPC_GET_ARG1(*call); |
60 | size_t klog_start = (size_t) IPC_GET_ARG1(*call); |
60 | size_t klog_len = (size_t) IPC_GET_ARG2(*call); |
61 | size_t klog_len = (size_t) IPC_GET_ARG2(*call); |
61 | size_t klog_stored = (size_t) IPC_GET_ARG3(*call); |
62 | size_t klog_stored = (size_t) IPC_GET_ARG3(*call); |
62 | size_t i; |
63 | size_t i; |
63 | for (i = klog_len - klog_stored; i < klog_len; i++) |
64 | for (i = klog_len - klog_stored; i < klog_len; i++) |
64 | putchar(klog[(klog_start + i) % KLOG_SIZE]); |
65 | putchar(klog[(klog_start + i) % KLOG_LENGTH]); |
65 | 66 | ||
66 | async_serialize_end(); |
67 | async_serialize_end(); |
67 | } |
68 | } |
68 | 69 | ||
69 | int main(int argc, char *argv[]) |
70 | int main(int argc, char *argv[]) |