Changeset fd07e57b in mainline for kernel/generic/include


Ignore:
Timestamp:
2014-01-05T21:25:41Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4aa2a27
Parents:
aacdb8e (diff), ca05e9b (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 cherrypicked kernel logger.

  • Old klog sybsystem was renamed to kio
  • Kernel and user-space log messages are stored in both logs (kernel logs end up in log/kernel file)
Location:
kernel/generic/include
Files:
1 added
3 edited

Legend:

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

    raacdb8e rfd07e57b  
    3939#include <print.h>
    4040#include <console/chardev.h>
     41#include <synch/spinlock.h>
    4142
    4243#define PAGING(counter, increment, before, after) \
     
    6263extern void console_init(void);
    6364
    64 extern void klog_init(void);
    65 extern void klog_update(void *);
     65extern void kio_init(void);
     66extern void kio_update(void *);
     67extern void kio_flush(void);
     68extern void kio_push_char(const wchar_t);
     69SPINLOCK_EXTERN(kio_lock);
    6670
    6771extern wchar_t getc(indev_t *indev);
    6872extern size_t gets(indev_t *indev, char *buf, size_t buflen);
    69 extern sysarg_t sys_klog(int cmd, const void *buf, size_t size);
     73extern sysarg_t sys_kio(int cmd, const void *buf, size_t size);
    7074
    7175extern void grab_console(void);
  • kernel/generic/include/debug.h

    raacdb8e rfd07e57b  
    107107#define LOG(format, ...) \
    108108        do { \
    109                 printf("%s() from %s at %s:%u: " format "\n", __func__, \
     109                log(LF_OTHER, LVL_DEBUG, \
     110                    "%s() from %s at %s:%u: " format,__func__, \
    110111                    symtab_fmt_name_lookup(CALLER), __FILE__, __LINE__, \
    111112                    ##__VA_ARGS__); \
  • kernel/generic/include/synch/spinlock.h

    raacdb8e rfd07e57b  
    137137#ifdef CONFIG_DEBUG_SPINLOCK
    138138
    139 #include <print.h>
     139#include <log.h>
    140140
    141141#define DEADLOCK_THRESHOLD  100000000
     
    146146        if ((pname)++ > (value)) { \
    147147                (pname) = 0; \
    148                 printf("Deadlock probe %s: exceeded threshold %u\n" \
     148                log(LF_OTHER, LVL_WARN, \
     149                    "Deadlock probe %s: exceeded threshold %u\n" \
    149150                    "cpu%u: function=%s, line=%u\n", \
    150151                    #pname, (value), CPU->id, __func__, __LINE__); \
Note: See TracChangeset for help on using the changeset viewer.