Changeset 0dbc4e7 in mainline


Ignore:
Timestamp:
2006-06-06T08:26:26Z (18 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bffa0b06
Parents:
874621f
Message:

Added possibility to interrupt task at exit from interrupt routine.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/include/interrupt.h

    r874621f r0dbc4e7  
    5555{
    5656        /* TODO */
     57        return 0;
    5758}
    5859static inline __native istate_get_pc(istate_t *istate)
    5960{
    6061        /* TODO */
     62        return 0;
    6163}
    6264
  • generic/src/interrupt/interrupt.c

    r874621f r0dbc4e7  
    8686       
    8787        exc_table[n].f(n + IVT_FIRST, istate);
     88        /* This is a safe place to exit exiting thread */
     89        if (THREAD && THREAD->interrupted && istate_from_uspace(istate))
     90                thread_exit();
    8891}
    8992
  • generic/src/proc/task.c

    r874621f r0dbc4e7  
    5050#include <errno.h>
    5151#include <syscall/copy.h>
     52#include <console/klog.h>
    5253
    5354#ifndef LOADED_PROG_STACK_PAGES_NO
     
    402403        ipc_cleanup();
    403404        futex_cleanup();
     405        klog_printf("Cleanup of task %lld completed.", TASK->taskid);
    404406}
    405407
  • generic/src/syscall/syscall.c

    r874621f r0dbc4e7  
    4848#include <sysinfo/sysinfo.h>
    4949#include <console/console.h>
     50#include <console/klog.h>
    5051
    5152/** Print using kernel facility
     
    9293{
    9394        __native rc;
    94         ipl_t ipl;
    95         bool exit = false;
    9695
    9796        if (id < SYSCALL_END)
    9897                rc = syscall_table[id](a1,a2,a3,a4);
    99         else
    100                 panic("Undefined syscall %d", id);
     98        else {
     99                klog_printf("TASK %lld: Unknown syscall id %d",TASK->taskid,id);
     100                task_kill(TASK->taskid);
     101                thread_exit();
     102        }
    101103               
    102         ipl = interrupts_disable();
    103         spinlock_lock(&THREAD->lock);
    104104        if (THREAD->interrupted)
    105                 exit = true;
    106         spinlock_unlock(&THREAD->lock);
    107         interrupts_restore(ipl);
    108        
    109         if (exit)
    110105                thread_exit();
    111106       
Note: See TracChangeset for help on using the changeset viewer.