Subversion Repositories HelenOS

Rev

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

Rev 4146 Rev 4173
Line 39... Line 39...
39
#include <synch/waitq.h>
39
#include <synch/waitq.h>
40
#include <synch/spinlock.h>
40
#include <synch/spinlock.h>
41
#include <arch/types.h>
41
#include <arch/types.h>
42
#include <ddi/irq.h>
42
#include <ddi/irq.h>
43
#include <ddi/ddi.h>
43
#include <ddi/ddi.h>
-
 
44
#include <event/event.h>
44
#include <ipc/irq.h>
45
#include <ipc/irq.h>
45
#include <arch.h>
46
#include <arch.h>
46
#include <func.h>
47
#include <func.h>
47
#include <print.h>
48
#include <print.h>
48
#include <atomic.h>
49
#include <atomic.h>
Line 98... Line 99...
98
    ddi_parea_register(&klog_parea);
99
    ddi_parea_register(&klog_parea);
99
   
100
   
100
    sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr);
101
    sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr);
101
    sysinfo_set_item_val("klog.pages", NULL, SIZE2FRAMES(KLOG_SIZE));
102
    sysinfo_set_item_val("klog.pages", NULL, SIZE2FRAMES(KLOG_SIZE));
102
   
103
   
103
    //irq_initialize(&klog_irq);
-
 
104
    //klog_irq.devno = devno;
-
 
105
    //klog_irq.inr = KLOG_VIRT_INR;
-
 
106
    //klog_irq.claim = klog_claim;
-
 
107
    //irq_register(&klog_irq);
-
 
108
   
-
 
109
    spinlock_lock(&klog_lock);
104
    spinlock_lock(&klog_lock);
110
    klog_inited = true;
105
    klog_inited = true;
111
    spinlock_unlock(&klog_lock);
106
    spinlock_unlock(&klog_lock);
112
}
107
}
113
 
108
 
Line 240... Line 235...
240
 
235
 
241
void klog_update(void)
236
void klog_update(void)
242
{
237
{
243
    spinlock_lock(&klog_lock);
238
    spinlock_lock(&klog_lock);
244
   
239
   
245
//  if ((klog_inited) && (klog_irq.notif_cfg.notify) && (klog_uspace > 0)) {
240
    if (klog_inited && event_is_subscribed(EVENT_KLOG) && klog_uspace > 0) {
246
//      ipc_irq_send_msg_3(&klog_irq, klog_start, klog_len, klog_uspace);
241
        event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace);
247
//      klog_uspace = 0;
242
        klog_uspace = 0;
248
//  }
243
    }
249
   
244
   
250
    spinlock_unlock(&klog_lock);
245
    spinlock_unlock(&klog_lock);
251
}
246
}
252
 
247
 
253
void putchar(char c)
248
void putchar(char c)