Пример #1
0
exception_t
handleInterruptEntry(void)
{
    irq_t irq;

    irq = getActiveIRQ();
#if defined(DEBUG) || defined(CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES)
    ksKernelEntry.path = Entry_Interrupt;
    ksKernelEntry.word = irq;
#endif /* DEBUG */

#ifdef CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES
    benchmark_track_start();
#endif

    if (irq != irqInvalid) {
        handleInterrupt(irq);
    } else {
#ifdef CONFIG_IRQ_REPORTING
        printf("Spurious interrupt\n");
#endif
        handleSpuriousIRQ();
    }

    schedule();
    activateThread();

#ifdef CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES
    benchmark_track_exit();
#endif

    return EXCEPTION_NONE;
}
Пример #2
0
Файл: syscall.c Проект: dnm/seL4
exception_t
handleInterruptEntry(void)
{
    irq_t irq;

    irq = getActiveIRQ();
    if (irq != irqInvalid) {
        handleInterrupt(irq);
    } else {
        printf("Spurious interrupt\n");
        handleSpuriousIRQ();
    }

    schedule();
    activateThread();

    return EXCEPTION_NONE;
}
Пример #3
0
exception_t
handleInterruptEntry(void)
{
    irq_t irq;
    //printf("==in handleInterruptEntry function===\n");
    irq = getActiveIRQ();
    if (irq != irqInvalid) {
        //printf("will call hanleInterrupt function\n");
        handleInterrupt(irq);
    } else {
        //printf("Spurious interrupt\n");
        handleSpuriousIRQ();
    }
    //printf("will schedule\n");
    schedule();
    activateThread();

    return EXCEPTION_NONE;
}
Пример #4
0
exception_t
handleInterruptEntry(void)
{
    irq_t irq;

    irq = getActiveIRQ();
#ifdef DEBUG
    ksKernelEntry.path = Debug_Interrupt;
    ksKernelEntry.irq = irq;
#endif /* DEBUG */
    if (irq != irqInvalid) {
        handleInterrupt(irq);
    } else {
#ifdef CONFIG_IRQ_REPORTING
        printf("Spurious interrupt\n");
#endif
        handleSpuriousIRQ();
    }

    schedule();
    activateThread();

    return EXCEPTION_NONE;
}
Пример #5
0
/* Check for pending IRQ */
bool_t isIRQPending(void)
{
    return getActiveIRQ() != irqInvalid;
}
Пример #6
0
Файл: syscall.c Проект: dnm/seL4
exception_t
handleSyscall(syscall_t syscall)
{
    exception_t ret;
    irq_t irq;

    switch (syscall) {
    case SysSend:
        ret = handleInvocation(false, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysNBSend:
        ret = handleInvocation(false, false);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysCall:
        ret = handleInvocation(true, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysWait:
        handleWait();
        break;

    case SysReply:
        handleReply();
        break;

    case SysReplyWait:
        handleReply();
        handleWait();
        break;

    case SysYield:
        handleYield();
        break;

    default:
        fail("Invalid syscall");
    }

    schedule();
    activateThread();

    return EXCEPTION_NONE;
}
Пример #7
0
exception_t
handleSyscall(syscall_t syscall)
{
    exception_t ret;
    irq_t irq;

#ifdef DEBUG
    ksKernelEntry.path = Debug_Syscall;
    ksKernelEntry.syscall_no = syscall;
#endif /* DEBUG */

    switch (syscall) {
    case SysSend:
        ret = handleInvocation(false, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysNBSend:
        ret = handleInvocation(false, false);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysCall:
        ret = handleInvocation(true, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysRecv:
        handleRecv(true);
        break;

    case SysReply:
        handleReply();
        break;

    case SysReplyRecv:
        handleReply();
        handleRecv(true);
        break;

    case SysNBRecv:
        handleRecv(false);
        break;

    case SysYield:
        handleYield();
        break;

    default:
        fail("Invalid syscall");
    }

    schedule();
    activateThread();

    return EXCEPTION_NONE;
}
Пример #8
0
/* Check for pending IRQ */
bool_t isIRQPending(void)
{
    return getActiveIRQ() != 0xff;
}
Пример #9
0
exception_t
handleSyscall(syscall_t syscall)
{
    exception_t ret;
    irq_t irq;

#if defined(DEBUG) || defined(CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES)
    ksKernelEntry.path = Entry_Syscall;
    ksKernelEntry.syscall_no = syscall;
#endif /* DEBUG */
#ifdef CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES
    benchmark_track_start();
#endif /* CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES */

    switch (syscall) {
    case SysSend:
        ret = handleInvocation(false, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysNBSend:
        ret = handleInvocation(false, false);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysCall:
        ret = handleInvocation(true, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysRecv:
        handleRecv(true);
        break;

    case SysReply:
        handleReply();
        break;

    case SysReplyRecv:
        handleReply();
        handleRecv(true);
        break;

    case SysNBRecv:
        handleRecv(false);
        break;

    case SysYield:
        handleYield();
        break;

    default:
        fail("Invalid syscall");
    }

    schedule();
    activateThread();

#ifdef CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES
    benchmark_track_exit();
#endif /* CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES */
    return EXCEPTION_NONE;
}
Пример #10
0
exception_t
handleSyscall(syscall_t syscall)
{
    exception_t ret;
    irq_t irq;

//printf("\n=====In handleSyscall funtion======\n");
//printf("syscall num is %d\n", syscall);
//printf("caller is %d of domain %d\n", ksCurThread->tcbPriority, ksCurThread->tcbDomain);

    switch (syscall) {
    case SysSend:
        ret = handleInvocation(false, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysNBSend:
        ret = handleInvocation(false, false);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysCall:
        ret = handleInvocation(true, true);
        if (unlikely(ret != EXCEPTION_NONE)) {
            irq = getActiveIRQ();
            if (irq != irqInvalid) {
                handleInterrupt(irq);
            }
        }
        break;

    case SysWait:
//printf("will call handleWait\n");
        handleWait(true);
        break;

    case SysReply:
        handleReply();
        break;

    case SysReplyWait:
        handleReply();
        handleWait(true);
        break;

    case SysPoll:
        handleWait(false);
        break;

    case SysYield:
        handleYield();
        break;

    default:
        fail("Invalid syscall");
    }

    schedule();
    activateThread();

    return EXCEPTION_NONE;
}