Changeset 98e4507 in mainline for kernel/generic/src/console/console.c


Ignore:
Timestamp:
2011-05-20T01:13:40Z (14 years ago)
Author:
Petr Koupy <petr.koupy@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    ra0bb65af r98e4507  
    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.