Changeset eb522e8 in mainline for kernel/generic/src/syscall/syscall.c


Ignore:
Timestamp:
2011-06-01T08:43:42Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Huuuuuge merge from development - all the work actually :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/syscall/syscall.c

    r9e2e715 reb522e8  
    4141#include <proc/program.h>
    4242#include <mm/as.h>
     43#include <mm/page.h>
    4344#include <print.h>
    4445#include <arch.h>
    4546#include <debug.h>
    4647#include <ddi/device.h>
     48#include <interrupt.h>
    4749#include <ipc/sysipc.h>
    4850#include <synch/futex.h>
     
    5658
    5759/** Dispatch system call */
    58 unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
    59     unative_t a4, unative_t a5, unative_t a6, unative_t id)
     60sysarg_t syscall_handler(sysarg_t a1, sysarg_t a2, sysarg_t a3,
     61    sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id)
    6062{
    6163        /* Do userpace accounting */
     
    6668#ifdef CONFIG_UDEBUG
    6769        /*
     70         * An istate_t-compatible record was created on the stack by the
     71         * low-level syscall handler. This is the userspace space state
     72         * structure.
     73         */
     74        THREAD->udebug.uspace_state = istate_get(THREAD);
     75
     76        /*
    6877         * Early check for undebugged tasks. We do not lock anything as this
    6978         * test need not be precise in either direction.
    70          *
    7179         */
    7280        if (THREAD->udebug.active)
     
    7482#endif
    7583       
    76         unative_t rc;
     84        sysarg_t rc;
    7785        if (id < SYSCALL_END) {
    7886                rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
    7987        } else {
    8088                printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
    81                 task_kill(TASK->taskid);
    82                 thread_exit();
     89                task_kill_self(true);
    8390        }
    8491       
     
    98105                udebug_stoppable_end();
    99106        }
     107
     108        /* Clear userspace state pointer */
     109        THREAD->udebug.uspace_state = NULL;
    100110#endif
    101111       
     
    117127        (syshandler_t) sys_thread_get_id,
    118128        (syshandler_t) sys_thread_usleep,
     129        (syshandler_t) sys_thread_udelay,
    119130       
    120131        (syshandler_t) sys_task_get_id,
    121132        (syshandler_t) sys_task_set_name,
     133        (syshandler_t) sys_task_kill,
     134        (syshandler_t) sys_task_exit,
    122135        (syshandler_t) sys_program_spawn_loader,
    123136       
     
    132145        (syshandler_t) sys_as_area_change_flags,
    133146        (syshandler_t) sys_as_area_destroy,
     147        (syshandler_t) sys_as_get_unmapped_area,
     148       
     149        /* Page mapping related syscalls. */
     150        (syshandler_t) sys_page_find_mapping,
    134151       
    135152        /* IPC related syscalls. */
     
    145162        (syshandler_t) sys_ipc_poke,
    146163        (syshandler_t) sys_ipc_hangup,
    147         (syshandler_t) sys_ipc_register_irq,
    148         (syshandler_t) sys_ipc_unregister_irq,
     164        (syshandler_t) sys_ipc_connect_kbox,
    149165       
    150166        /* Event notification syscalls. */
    151167        (syshandler_t) sys_event_subscribe,
     168        (syshandler_t) sys_event_unmask,
    152169       
    153170        /* Capabilities related syscalls. */
     
    159176        (syshandler_t) sys_physmem_map,
    160177        (syshandler_t) sys_iospace_enable,
    161         (syshandler_t) sys_interrupt_enable,
     178        (syshandler_t) sys_register_irq,
     179        (syshandler_t) sys_unregister_irq,
    162180       
    163181        /* Sysinfo syscalls */
     
    169187        /* Debug calls */
    170188        (syshandler_t) sys_debug_enable_console,
    171         (syshandler_t) sys_debug_disable_console,
    172        
    173         (syshandler_t) sys_ipc_connect_kbox
     189        (syshandler_t) sys_debug_disable_console
    174190};
    175191
Note: See TracChangeset for help on using the changeset viewer.