X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Firq.c;h=85608147e1277af38adbdedb1fd8af89e94575c4;hb=32d1445272120a254d77ce8d1af1f527da7a2c17;hp=9a1ff514cef875e2aa426cd31134ffd7274e7df0;hpb=b94d14d668b87c1e6f6ddad5b6aafd6b45a613b6;p=bertos.git diff --git a/bertos/kern/irq.c b/bertos/kern/irq.c index 9a1ff514..85608147 100644 --- a/bertos/kern/irq.c +++ b/bertos/kern/irq.c @@ -31,7 +31,7 @@ * * \brief Process scheduler (public interface). * - * \version $Id: proc.h 1646 2008-08-17 13:49:48Z bernie $ + * \version $Id$ * \author Bernie Innocenti * * Still in development, disable nightly test for now @@ -44,11 +44,10 @@ #include #include -#include +#include "cfg/cfg_proc.h" #include // FIXME: move POSIX stuff to irq_posix.h - MOD_DEFINE(irq) // FIXME @@ -57,32 +56,7 @@ static void (*irq_handlers[100])(void); /* signal handler */ void irq_entry(int signum) { -#if CONFIG_KERN_PREEMPT - Process * const old_process = CurrentProcess; -#endif - irq_handlers[signum](); - -#if CONFIG_KERN_PREEMPT - ASSERT2(CurrentProcess, "no idle proc?"); - - if (old_process != CurrentProcess) - { - IRQ_DISABLE; - - TRACEMSG("switching from %p:%s to %p:%s", - old_process, old_process ? old_process->monitor.name : "---", - CurrentProcess, proc_currentName()); - - if (old_process) - swapcontext(&old_process->context, &CurrentProcess->context); - else - setcontext(&CurrentProcess->context); - - IRQ_ENABLE; - } - TRACEMSG("resuming %p:%s", CurrentProcess, CurrentProcess->monitor.name); -#endif // CONFIG_KERN_PREEMPT } void irq_register(int irq, void (*callback)(void))