Subversion Repositories HelenOS

Rev

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

Rev 4345 Rev 4347
Line 39... Line 39...
39
#include <async.h>
39
#include <async.h>
40
#include <ipc/services.h>
40
#include <ipc/services.h>
41
#include <as.h>
41
#include <as.h>
42
#include <sysinfo.h>
42
#include <sysinfo.h>
43
#include <io/stream.h>
43
#include <io/stream.h>
-
 
44
#include <console.h>
-
 
45
#include <event.h>
44
#include <errno.h>
46
#include <errno.h>
45
 
47
 
46
#define NAME "klog"
48
#define NAME "klog"
47
 
49
 
48
#define KLOG_SIZE PAGE_SIZE
50
#define KLOG_SIZE PAGE_SIZE
Line 81... Line 83...
81
    if (res != EOK) {
83
    if (res != EOK) {
82
        printf(NAME ": Error initializing memory area\n");
84
        printf(NAME ": Error initializing memory area\n");
83
        return -1;
85
        return -1;
84
    }
86
    }
85
   
87
   
86
    int devno = sysinfo_value("klog.devno");
-
 
87
    int inr = sysinfo_value("klog.inr");
-
 
88
    if (ipc_register_irq(inr, devno, 0, NULL) != EOK) {
88
    if (event_subscribe(EVENT_KLOG, 0) != EOK) {
89
        printf(NAME ": Error registering klog notifications\n");
89
        printf(NAME ": Error registering klog notifications\n");
90
        return -1;
90
        return -1;
91
    }
91
    }
92
   
92
   
93
    async_set_interrupt_received(interrupt_received);
93
    async_set_interrupt_received(interrupt_received);