Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/console.c

    rd7533c7 r97d42d5  
    5353#include <str.h>
    5454
    55 #define KLOG_PAGES    4
     55#define KLOG_PAGES    8
    5656#define KLOG_LENGTH   (KLOG_PAGES * PAGE_SIZE / sizeof(wchar_t))
    57 #define KLOG_LATENCY  8
    5857
    5958/** Kernel log cyclic buffer */
     
    165164        sysinfo_set_item_val("klog.faddr", NULL, (sysarg_t) faddr);
    166165        sysinfo_set_item_val("klog.pages", NULL, KLOG_PAGES);
     166       
     167        event_set_unmask_callback(EVENT_KLOG, klog_update);
    167168       
    168169        spinlock_lock(&klog_lock);
     
    265266        spinlock_lock(&klog_lock);
    266267       
    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;
    270272        }
    271273       
     
    316318                klog_uspace++;
    317319       
    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        
    325320        spinlock_unlock(&klog_lock);
    326321       
    327         if (update)
     322        /* Force notification on newline */
     323        if (ch == '\n')
    328324                klog_update();
    329325}
Note: See TracChangeset for help on using the changeset viewer.