Changeset c05a50f in mainline


Ignore:
Timestamp:
2008-06-06T23:17:16Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d62052
Parents:
1c03c17
Message:

rename SYS_IO to SYS_KLOG
do not notify uspace klog with every single character, introduce some latency

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/syscall/syscall.h

    r1c03c17 rc05a50f  
    3737
    3838typedef enum {
    39         SYS_IO = 0,
     39        SYS_KLOG = 0,
    4040        SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - fibril.S */
    4141       
  • kernel/generic/src/console/console.c

    r1c03c17 rc05a50f  
    5050
    5151#define KLOG_SIZE PAGE_SIZE
     52#define KLOG_LATENCY 8
    5253
    5354/**< Kernel log cyclic buffer */
     
    276277                klog_uspace++;
    277278       
     279        /* Check notify uspace to update */
     280        bool update;
     281        if ((klog_uspace > KLOG_LATENCY) || (c == '\n'))
     282                update = true;
     283        else
     284                update = false;
     285       
    278286        spinlock_unlock(&klog_lock);
    279287       
    280         klog_update();
     288        if (update)
     289                klog_update();
    281290}
    282291
  • kernel/generic/src/syscall/syscall.c

    r1c03c17 rc05a50f  
    5858 *
    5959 */
    60 static unative_t sys_io(int fd, const void * buf, size_t count)
     60static unative_t sys_klog(int fd, const void * buf, size_t count)
    6161{
    6262        size_t i;
     
    115115
    116116syshandler_t syscall_table[SYSCALL_END] = {
    117         (syshandler_t) sys_io,
     117        (syshandler_t) sys_klog,
    118118        (syshandler_t) sys_tls_set,
    119119       
Note: See TracChangeset for help on using the changeset viewer.