Rev 3964 | Rev 4087 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3964 | Rev 3965 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | #include <atomic.h> |
49 | #include <atomic.h> |
50 | 50 | ||
51 | #define KLOG_SIZE PAGE_SIZE |
51 | #define KLOG_SIZE PAGE_SIZE |
52 | #define KLOG_LATENCY 8 |
52 | #define KLOG_LATENCY 8 |
53 | 53 | ||
54 | /**< Kernel log cyclic buffer */ |
54 | /** Kernel log cyclic buffer */ |
55 | static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE))); |
55 | static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE))); |
56 | 56 | ||
57 | /**< Kernel log initialized */ |
57 | /** Kernel log initialized */ |
58 | static bool klog_inited = false; |
58 | static bool klog_inited = false; |
59 | /**< First kernel log characters */ |
59 | /** First kernel log characters */ |
60 | static index_t klog_start = 0; |
60 | static index_t klog_start = 0; |
61 | /**< Number of valid kernel log characters */ |
61 | /** Number of valid kernel log characters */ |
62 | static size_t klog_len = 0; |
62 | static size_t klog_len = 0; |
63 | /**< Number of stored (not printed) kernel log characters */ |
63 | /** Number of stored (not printed) kernel log characters */ |
64 | static size_t klog_stored = 0; |
64 | static size_t klog_stored = 0; |
65 | /**< Number of stored kernel log characters for uspace */ |
65 | /** Number of stored kernel log characters for uspace */ |
66 | static size_t klog_uspace = 0; |
66 | static size_t klog_uspace = 0; |
67 | 67 | ||
68 | /**< Silence output */ |
68 | /** Silence output */ |
69 | bool silent = false; |
69 | bool silent = false; |
70 | 70 | ||
71 | /**< Kernel log spinlock */ |
71 | /** Kernel log spinlock */ |
72 | SPINLOCK_INITIALIZE(klog_lock); |
72 | SPINLOCK_INITIALIZE(klog_lock); |
73 | 73 | ||
74 | /** Physical memory area used for klog buffer */ |
74 | /** Physical memory area used for klog buffer */ |
75 | static parea_t klog_parea; |
75 | static parea_t klog_parea; |
76 | 76 |