Subversion Repositories HelenOS

Rev

Rev 3097 | Rev 3844 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3097 Rev 3113
Line 47... Line 47...
47
#include <func.h>
47
#include <func.h>
48
#include <print.h>
48
#include <print.h>
49
#include <atomic.h>
49
#include <atomic.h>
50
 
50
 
51
#define KLOG_SIZE PAGE_SIZE
51
#define KLOG_SIZE PAGE_SIZE
-
 
52
#define KLOG_LATENCY 8
52
 
53
 
53
/**< Kernel log cyclic buffer */
54
/**< Kernel log cyclic buffer */
54
static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE)));
55
static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE)));
55
 
56
 
56
/**< Kernel log initialized */
57
/**< Kernel log initialized */
Line 273... Line 274...
273
   
274
   
274
    /* The character is stored for uspace */
275
    /* The character is stored for uspace */
275
    if (klog_uspace < klog_len)
276
    if (klog_uspace < klog_len)
276
        klog_uspace++;
277
        klog_uspace++;
277
   
278
   
-
 
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
   
278
    spinlock_unlock(&klog_lock);
286
    spinlock_unlock(&klog_lock);
279
   
287
   
-
 
288
    if (update)
280
    klog_update();
289
        klog_update();
281
}
290
}
282
 
291
 
283
/** @}
292
/** @}
284
 */
293
 */