Changes in kernel/generic/src/console/console.c [97d42d5:d7533c7] in mainline
- File:
-
- 1 edited
-
kernel/generic/src/console/console.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
r97d42d5 rd7533c7 53 53 #include <str.h> 54 54 55 #define KLOG_PAGES 855 #define KLOG_PAGES 4 56 56 #define KLOG_LENGTH (KLOG_PAGES * PAGE_SIZE / sizeof(wchar_t)) 57 #define KLOG_LATENCY 8 57 58 58 59 /** Kernel log cyclic buffer */ … … 164 165 sysinfo_set_item_val("klog.faddr", NULL, (sysarg_t) faddr); 165 166 sysinfo_set_item_val("klog.pages", NULL, KLOG_PAGES); 166 167 event_set_unmask_callback(EVENT_KLOG, klog_update);168 167 169 168 spinlock_lock(&klog_lock); … … 266 265 spinlock_lock(&klog_lock); 267 266 268 if ((klog_inited) && (klog_uspace > 0)) { 269 if (event_notify_3(EVENT_KLOG, true, klog_start, klog_len, 270 klog_uspace) == EOK) 271 klog_uspace = 0; 267 if ((klog_inited) && (event_is_subscribed(EVENT_KLOG)) && (klog_uspace > 0)) { 268 event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace); 269 klog_uspace = 0; 272 270 } 273 271 … … 318 316 klog_uspace++; 319 317 318 /* Check notify uspace to update */ 319 bool update; 320 if ((klog_uspace > KLOG_LATENCY) || (ch == '\n')) 321 update = true; 322 else 323 update = false; 324 320 325 spinlock_unlock(&klog_lock); 321 326 322 /* Force notification on newline */ 323 if (ch == '\n') 327 if (update) 324 328 klog_update(); 325 329 }
Note:
See TracChangeset
for help on using the changeset viewer.
