Changeset 98e4507 in mainline for kernel/generic/src/console/console.c
- Timestamp:
- 2011-05-20T01:13:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5c460cc
- Parents:
- a0bb65af (diff), 326bf65 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
ra0bb65af r98e4507 53 53 #include <str.h> 54 54 55 #define KLOG_PAGES 455 #define KLOG_PAGES 8 56 56 #define KLOG_LENGTH (KLOG_PAGES * PAGE_SIZE / sizeof(wchar_t)) 57 #define KLOG_LATENCY 858 57 59 58 /** Kernel log cyclic buffer */ … … 165 164 sysinfo_set_item_val("klog.faddr", NULL, (sysarg_t) faddr); 166 165 sysinfo_set_item_val("klog.pages", NULL, KLOG_PAGES); 166 167 event_set_unmask_callback(EVENT_KLOG, klog_update); 167 168 168 169 spinlock_lock(&klog_lock); … … 265 266 spinlock_lock(&klog_lock); 266 267 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; 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; 270 272 } 271 273 … … 316 318 klog_uspace++; 317 319 318 /* Check notify uspace to update */319 bool update;320 if ((klog_uspace > KLOG_LATENCY) || (ch == '\n'))321 update = true;322 else323 update = false;324 325 320 spinlock_unlock(&klog_lock); 326 321 327 if (update) 322 /* Force notification on newline */ 323 if (ch == '\n') 328 324 klog_update(); 329 325 }
Note:
See TracChangeset
for help on using the changeset viewer.