/trunk/kernel/generic/include/event/event.h |
---|
0,0 → 1,79 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_EVENT_H_ |
#define KERN_EVENT_H_ |
#include <event/event_types.h> |
#include <arch/types.h> |
#include <synch/spinlock.h> |
#include <ipc/ipc.h> |
/** Event notification structure. */ |
typedef struct { |
SPINLOCK_DECLARE(lock); |
/** Answerbox for notifications. */ |
answerbox_t *answerbox; |
/** Method to be used for the notification. */ |
unative_t method; |
/** Counter. */ |
count_t counter; |
} event_t; |
extern void event_init(void); |
extern unative_t sys_event_subscribe(unative_t, unative_t); |
extern bool event_is_subscribed(event_type_t); |
extern void event_cleanup_answerbox(answerbox_t *); |
#define event_notify_0(e) \ |
event_notify((e), 0, 0, 0, 0, 0) |
#define event_notify_1(e, a1) \ |
event_notify((e), (a1), 0, 0, 0, 0) |
#define event_notify_2(e, a1, a2) \ |
event_notify((e), (a1), (a2), 0, 0, 0) |
#define event_notify_3(e, a1, a2, a3) \ |
event_notify((e), (a1), (a2), (a3), 0, 0) |
#define event_notify_4(e, a1, a2, a3, a4) \ |
event_notify((e), (a1), (a2), (a3), (a4), 0) |
#define event_notify_5(e, a1, a2, a3, a4, a5) \ |
event_notify((e), (a1), (a2), (a3), (a4), (a5)) |
extern void event_notify(event_type_t, unative_t, unative_t, unative_t, |
unative_t, unative_t); |
#endif |
/** @} |
*/ |
/trunk/kernel/generic/include/event/event_types.h |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_EVENT_TYPES_H_ |
#define KERN_EVENT_TYPES_H_ |
typedef enum event_type { |
EVENT_KLOG = 0, |
EVENT_KCONSOLE, |
EVENT_END |
} event_type_t; |
#endif |
/** @} |
*/ |
/trunk/kernel/generic/include/syscall/syscall.h |
---|
68,6 → 68,8 |
SYS_IPC_HANGUP, |
SYS_IPC_REGISTER_IRQ, |
SYS_IPC_UNREGISTER_IRQ, |
SYS_EVENT_SUBSCRIBE, |
SYS_CAP_GRANT, |
SYS_CAP_REVOKE, |
/trunk/kernel/generic/src/event/event.c |
---|
0,0 → 1,153 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
* @{ |
*/ |
/** |
* @file |
* @brief Kernel event notifications. |
*/ |
#include <event/event.h> |
#include <event/event_types.h> |
#include <mm/slab.h> |
#include <arch/types.h> |
#include <synch/spinlock.h> |
#include <console/console.h> |
#include <memstr.h> |
#include <errno.h> |
#include <arch.h> |
/** |
* The events array. |
* Arranging the events in this two-dimensional array should decrease the |
* likelyhood of cacheline ping-pong. |
*/ |
static event_t *events[EVENT_END]; |
/** Initialize kernel events. */ |
void event_init(void) |
{ |
int i; |
for (i = 0; i < EVENT_END; i++) { |
events[i] = (event_t *) malloc(sizeof(event_t), 0); |
spinlock_initialize(&events[i]->lock, "event.lock"); |
events[i]->answerbox = NULL; |
events[i]->counter = 0; |
events[i]->method = 0; |
} |
} |
static int |
event_subscribe(event_type_t e, unative_t method, answerbox_t *answerbox) |
{ |
if (e >= EVENT_END) |
return ELIMIT; |
int res = EEXISTS; |
event_t *event = events[e]; |
spinlock_lock(&event->lock); |
if (!event->answerbox) { |
event->answerbox = answerbox; |
event->method = method; |
event->counter = 0; |
res = EOK; |
} |
spinlock_unlock(&event->lock); |
return res; |
} |
unative_t sys_event_subscribe(unative_t evno, unative_t method) |
{ |
return (unative_t) event_subscribe((event_type_t) evno, (unative_t) |
method, &TASK->answerbox); |
} |
bool event_is_subscribed(event_type_t e) |
{ |
bool res; |
ASSERT(e < EVENT_END); |
spinlock_lock(&events[e]->lock); |
res = events[e]->answerbox != NULL; |
spinlock_unlock(&events[e]->lock); |
return res; |
} |
void event_cleanup_answerbox(answerbox_t *answerbox) |
{ |
int i; |
for (i = 0; i < EVENT_END; i++) { |
spinlock_lock(&events[i]->lock); |
if (events[i]->answerbox == answerbox) { |
events[i]->answerbox = NULL; |
events[i]->counter = 0; |
events[i]->method = 0; |
} |
spinlock_unlock(&events[i]->lock); |
} |
} |
void |
event_notify(event_type_t e, unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5) |
{ |
ASSERT(e < EVENT_END); |
event_t *event = events[e]; |
spinlock_lock(&event->lock); |
if (event->answerbox) { |
call_t *call = ipc_call_alloc(FRAME_ATOMIC); |
if (call) { |
call->flags |= IPC_CALL_NOTIF; |
call->priv = ++event->counter; |
IPC_SET_METHOD(call->data, event->method); |
IPC_SET_ARG1(call->data, a1); |
IPC_SET_ARG2(call->data, a2); |
IPC_SET_ARG3(call->data, a3); |
IPC_SET_ARG4(call->data, a4); |
IPC_SET_ARG5(call->data, a5); |
spinlock_lock(&event->answerbox->irq_lock); |
list_append(&call->link, &event->answerbox->irq_notifs); |
spinlock_unlock(&event->answerbox->irq_lock); |
waitq_wakeup(&event->answerbox->wq, WAKEUP_FIRST); |
} |
} |
spinlock_unlock(&event->lock); |
} |
/** @} |
*/ |
/trunk/kernel/generic/src/main/main.c |
---|
82,6 → 82,7 |
#include <smp/smp.h> |
#include <ddi/ddi.h> |
#include <main/main.h> |
#include <event/event.h> |
/** Global configuration structure. */ |
config_t config; |
255,12 → 256,9 |
printf("No init binaries found\n"); |
LOG_EXEC(ipc_init()); |
LOG_EXEC(event_init()); |
LOG_EXEC(klog_init()); |
#ifdef CONFIG_KCONSOLE |
LOG_EXEC(kconsole_notify_init()); |
#endif |
/* |
* Create kernel task. |
*/ |
/trunk/kernel/generic/src/console/console.c |
---|
41,6 → 41,7 |
#include <arch/types.h> |
#include <ddi/irq.h> |
#include <ddi/ddi.h> |
#include <event/event.h> |
#include <ipc/irq.h> |
#include <arch.h> |
#include <func.h> |
100,12 → 101,6 |
sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr); |
sysinfo_set_item_val("klog.pages", NULL, SIZE2FRAMES(KLOG_SIZE)); |
//irq_initialize(&klog_irq); |
//klog_irq.devno = devno; |
//klog_irq.inr = KLOG_VIRT_INR; |
//klog_irq.claim = klog_claim; |
//irq_register(&klog_irq); |
spinlock_lock(&klog_lock); |
klog_inited = true; |
spinlock_unlock(&klog_lock); |
242,10 → 237,10 |
{ |
spinlock_lock(&klog_lock); |
// if ((klog_inited) && (klog_irq.notif_cfg.notify) && (klog_uspace > 0)) { |
// ipc_irq_send_msg_3(&klog_irq, klog_start, klog_len, klog_uspace); |
// klog_uspace = 0; |
// } |
if (klog_inited && event_is_subscribed(EVENT_KLOG) && klog_uspace > 0) { |
event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace); |
klog_uspace = 0; |
} |
spinlock_unlock(&klog_lock); |
} |
/trunk/kernel/generic/src/console/cmd.c |
---|
64,6 → 64,7 |
#include <proc/task.h> |
#include <ipc/ipc.h> |
#include <ipc/irq.h> |
#include <event/event.h> |
#include <symtab.h> |
#include <errno.h> |
954,8 → 955,7 |
printf("The kernel will now relinquish the console.\n"); |
release_console(); |
if ((kconsole_notify) && (kconsole_irq.notif_cfg.notify)) |
ipc_irq_send_msg_0(&kconsole_irq); |
event_notify_0(EVENT_KCONSOLE); |
return 1; |
} |
/trunk/kernel/generic/src/console/kconsole.c |
---|
87,30 → 87,6 |
index_t *end); |
static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; |
/* |
* For now, we use 0 as INR. |
* However, it is therefore desirable to have architecture specific |
* definition of KCONSOLE_VIRT_INR in the future. |
*/ |
#define KCONSOLE_VIRT_INR 0 |
bool kconsole_notify = false; |
irq_t kconsole_irq; |
/** Allways refuse IRQ ownership. |
* |
* This is not a real IRQ, so we always decline. |
* |
* @return Always returns IRQ_DECLINE. |
* |
*/ |
static irq_ownership_t kconsole_claim(irq_t *irq) |
{ |
return IRQ_DECLINE; |
} |
/** Initialize kconsole data structures |
* |
* This is the most basic initialization, almost no |
126,27 → 102,6 |
history[i][0] = '\0'; |
} |
/** Initialize kconsole notification mechanism |
* |
* Initialize the virtual IRQ notification mechanism. |
* |
*/ |
void kconsole_notify_init(void) |
{ |
sysinfo_set_item_val("kconsole.present", NULL, true); |
sysinfo_set_item_val("kconsole.inr", NULL, KCONSOLE_VIRT_INR); |
irq_initialize(&kconsole_irq); |
kconsole_irq.devno = device_assign_devno(); |
kconsole_irq.inr = KCONSOLE_VIRT_INR; |
kconsole_irq.claim = kconsole_claim; |
irq_register(&kconsole_irq); |
kconsole_notify = true; |
} |
/** Register kconsole command. |
* |
* @param cmd Structure describing the command. |
/trunk/kernel/generic/src/syscall/syscall.c |
---|
49,6 → 49,7 |
#include <synch/futex.h> |
#include <synch/smc.h> |
#include <ddi/ddi.h> |
#include <event/event.h> |
#include <security/cap.h> |
#include <sysinfo/sysinfo.h> |
#include <console/console.h> |
126,6 → 127,9 |
(syshandler_t) sys_ipc_hangup, |
(syshandler_t) sys_ipc_register_irq, |
(syshandler_t) sys_ipc_unregister_irq, |
/* Event notification syscalls. */ |
(syshandler_t) sys_event_subscribe, |
/* Capabilities related syscalls. */ |
(syshandler_t) sys_cap_grant, |
/trunk/kernel/generic/src/ipc/ipc.c |
---|
44,6 → 44,7 |
#include <synch/synch.h> |
#include <ipc/ipc.h> |
#include <ipc/kbox.h> |
#include <event/event.h> |
#include <errno.h> |
#include <mm/slab.h> |
#include <arch.h> |
51,6 → 52,7 |
#include <memstr.h> |
#include <debug.h> |
#include <print.h> |
#include <console/console.h> |
#include <proc/thread.h> |
526,6 → 528,9 |
for (i = 0; i < IPC_MAX_PHONES; i++) |
ipc_phone_hangup(&TASK->phones[i]); |
/* Unsubscribe from any event notifications. */ |
event_cleanup_answerbox(&TASK->answerbox); |
/* Disconnect all connected irqs */ |
ipc_irq_cleanup(&TASK->answerbox); |
/trunk/kernel/Makefile |
---|
161,6 → 161,7 |
generic/src/ddi/irq.c \ |
generic/src/ddi/device.c \ |
generic/src/debug/symtab.c \ |
generic/src/event/event.c \ |
generic/src/interrupt/interrupt.c \ |
generic/src/main/main.c \ |
generic/src/main/kinit.c \ |
/trunk/uspace/app/klog/klog.c |
---|
42,6 → 42,7 |
#include <sysinfo.h> |
#include <io/stream.h> |
#include <console.h> |
#include <event.h> |
#include <errno.h> |
#define NAME "klog" |
82,11 → 83,10 |
return -1; |
} |
// int inr = sysinfo_value("klog.inr"); |
// if (ipc_register_irq(inr, devno, 0, NULL) != EOK) { |
// printf(NAME ": Error registering klog notifications\n"); |
// return -1; |
// } |
if (event_subscribe(EVENT_KLOG, 0) != EOK) { |
printf(NAME ": Error registering klog notifications\n"); |
return -1; |
} |
async_set_interrupt_received(interrupt_received); |
klog_update(); |
/trunk/uspace/app/trace/syscalls.c |
---|
65,6 → 65,8 |
[SYS_IPC_REGISTER_IRQ] = { "ipc_register_irq", 4, V_ERRNO }, |
[SYS_IPC_UNREGISTER_IRQ] = { "ipc_unregister_irq", 2, V_ERRNO }, |
[SYS_EVENT_SUBSCRIBE] = { "event_subscribe", 2, V_ERRNO }, |
[SYS_CAP_GRANT] = { "cap_grant", 2, V_ERRNO }, |
[SYS_CAP_REVOKE] = { "cap_revoke", 2, V_ERRNO }, |
[SYS_PHYSMEM_MAP] = { "physmem_map", 4, V_ERRNO }, |
/trunk/uspace/lib/libc/include/event.h |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_EVENT_H_ |
#define LIBC_EVENT_H_ |
#include <kernel/event/event_types.h> |
#include <ipc/ipc.h> |
extern int event_subscribe(event_type_t, ipcarg_t); |
#endif |
/** @} |
*/ |
/trunk/uspace/lib/libc/generic/event.c |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
* @} |
*/ |
/** @addtogroup libc |
*/ |
/** @file |
*/ |
#include <libc.h> |
#include <event.h> |
#include <kernel/event/event_types.h> |
#include <ipc/ipc.h> |
/** Subscribe for event notifications. |
* |
* @param e Event number. |
* @param method Use this method for notifying me. |
* |
* @return Value returned by the kernel. |
*/ |
int event_subscribe(event_type_t e, ipcarg_t method) |
{ |
return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) e, (sysarg_t) method); |
} |
/** @} |
*/ |
/trunk/uspace/lib/libc/Makefile |
---|
47,6 → 47,7 |
generic/as.c \ |
generic/cap.c \ |
generic/console.c \ |
generic/event.c \ |
generic/mem.c \ |
generic/string.c \ |
generic/fibril.c \ |
/trunk/uspace/srv/console/console.c |
---|
49,6 → 49,7 |
#include <sys/mman.h> |
#include <stdio.h> |
#include <sysinfo.h> |
#include <event.h> |
#include "console.h" |
#include "gcons.h" |
729,13 → 730,10 |
return -1; |
/* Receive kernel notifications */ |
// if (sysinfo_value("kconsole.present")) { |
// int inr = sysinfo_value("kconsole.inr"); |
// if (ipc_register_irq(inr, device_assign_devno(), 0, NULL) != EOK) |
// printf(NAME ": Error registering kconsole notifications\n"); |
// |
// async_set_interrupt_received(interrupt_received); |
// } |
if (event_subscribe(EVENT_KCONSOLE, 0) != EOK) |
printf(NAME ": Error registering kconsole notifications\n"); |
async_set_interrupt_received(interrupt_received); |
// FIXME: avoid connectiong to itself, keep using klog |
// printf(NAME ": Accepting connections\n"); |