Ignore:
File:
1 edited

Legend:

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

    r24abb85d raf9dd1e  
    4545#include <arch.h>
    4646#include <debug.h>
     47#include <ddi/device.h>
    4748#include <interrupt.h>
    4849#include <ipc/sysipc.h>
     
    5253#include <ddi/ddi.h>
    5354#include <ipc/event.h>
    54 #include <security/perm.h>
     55#include <security/cap.h>
    5556#include <sysinfo/sysinfo.h>
    5657#include <console/console.h>
     
    122123syshandler_t syscall_table[SYSCALL_END] = {
    123124        /* System management syscalls. */
    124         [SYS_KIO] = (syshandler_t) sys_kio,
     125        (syshandler_t) sys_kio,
    125126       
    126127        /* Thread and task related syscalls. */
    127         [SYS_THREAD_CREATE] = (syshandler_t) sys_thread_create,
    128         [SYS_THREAD_EXIT] = (syshandler_t) sys_thread_exit,
    129         [SYS_THREAD_GET_ID] = (syshandler_t) sys_thread_get_id,
    130         [SYS_THREAD_USLEEP] = (syshandler_t) sys_thread_usleep,
    131         [SYS_THREAD_UDELAY] = (syshandler_t) sys_thread_udelay,
    132        
    133         [SYS_TASK_GET_ID] = (syshandler_t) sys_task_get_id,
    134         [SYS_TASK_SET_NAME] = (syshandler_t) sys_task_set_name,
    135         [SYS_TASK_KILL] = (syshandler_t) sys_task_kill,
    136         [SYS_TASK_EXIT] = (syshandler_t) sys_task_exit,
    137         [SYS_PROGRAM_SPAWN_LOADER] = (syshandler_t) sys_program_spawn_loader,
     128        (syshandler_t) sys_thread_create,
     129        (syshandler_t) sys_thread_exit,
     130        (syshandler_t) sys_thread_get_id,
     131        (syshandler_t) sys_thread_usleep,
     132        (syshandler_t) sys_thread_udelay,
     133       
     134        (syshandler_t) sys_task_get_id,
     135        (syshandler_t) sys_task_set_name,
     136        (syshandler_t) sys_task_kill,
     137        (syshandler_t) sys_task_exit,
     138        (syshandler_t) sys_program_spawn_loader,
    138139       
    139140        /* Synchronization related syscalls. */
    140         [SYS_FUTEX_SLEEP] = (syshandler_t) sys_futex_sleep,
    141         [SYS_FUTEX_WAKEUP] = (syshandler_t) sys_futex_wakeup,
    142         [SYS_SMC_COHERENCE] = (syshandler_t) sys_smc_coherence,
    143         [SYS_SMP_MEMORY_BARRIER] = (syshandler_t) sys_smp_memory_barrier,
     141        (syshandler_t) sys_futex_sleep,
     142        (syshandler_t) sys_futex_wakeup,
     143        (syshandler_t) sys_smc_coherence,
     144        (syshandler_t) sys_smp_memory_barrier,
     145       
    144146       
    145147        /* Address space related syscalls. */
    146         [SYS_AS_AREA_CREATE] = (syshandler_t) sys_as_area_create,
    147         [SYS_AS_AREA_RESIZE] = (syshandler_t) sys_as_area_resize,
    148         [SYS_AS_AREA_CHANGE_FLAGS] = (syshandler_t) sys_as_area_change_flags,
    149         [SYS_AS_AREA_DESTROY] = (syshandler_t) sys_as_area_destroy,
     148        (syshandler_t) sys_as_area_create,
     149        (syshandler_t) sys_as_area_resize,
     150        (syshandler_t) sys_as_area_change_flags,
     151        (syshandler_t) sys_as_area_destroy,
    150152       
    151153        /* Page mapping related syscalls. */
    152         [SYS_PAGE_FIND_MAPPING] = (syshandler_t) sys_page_find_mapping,
     154        (syshandler_t) sys_page_find_mapping,
    153155       
    154156        /* IPC related syscalls. */
    155         [SYS_IPC_CALL_ASYNC_FAST] = (syshandler_t) sys_ipc_call_async_fast,
    156         [SYS_IPC_CALL_ASYNC_SLOW] = (syshandler_t) sys_ipc_call_async_slow,
    157         [SYS_IPC_ANSWER_FAST] = (syshandler_t) sys_ipc_answer_fast,
    158         [SYS_IPC_ANSWER_SLOW] = (syshandler_t) sys_ipc_answer_slow,
    159         [SYS_IPC_FORWARD_FAST] = (syshandler_t) sys_ipc_forward_fast,
    160         [SYS_IPC_FORWARD_SLOW] = (syshandler_t) sys_ipc_forward_slow,
    161         [SYS_IPC_WAIT] = (syshandler_t) sys_ipc_wait_for_call,
    162         [SYS_IPC_POKE] = (syshandler_t) sys_ipc_poke,
    163         [SYS_IPC_HANGUP] = (syshandler_t) sys_ipc_hangup,
    164         [SYS_IPC_CONNECT_KBOX] = (syshandler_t) sys_ipc_connect_kbox,
     157        (syshandler_t) sys_ipc_call_async_fast,
     158        (syshandler_t) sys_ipc_call_async_slow,
     159        (syshandler_t) sys_ipc_answer_fast,
     160        (syshandler_t) sys_ipc_answer_slow,
     161        (syshandler_t) sys_ipc_forward_fast,
     162        (syshandler_t) sys_ipc_forward_slow,
     163        (syshandler_t) sys_ipc_wait_for_call,
     164        (syshandler_t) sys_ipc_poke,
     165        (syshandler_t) sys_ipc_hangup,
     166        (syshandler_t) sys_ipc_connect_kbox,
    165167       
    166168        /* Event notification syscalls. */
    167         [SYS_IPC_EVENT_SUBSCRIBE] = (syshandler_t) sys_ipc_event_subscribe,
    168         [SYS_IPC_EVENT_UNSUBSCRIBE] = (syshandler_t) sys_ipc_event_unsubscribe,
    169         [SYS_IPC_EVENT_UNMASK] = (syshandler_t) sys_ipc_event_unmask,
    170        
    171         /* Permission related syscalls. */
    172         [SYS_PERM_GRANT] = (syshandler_t) sys_perm_grant,
    173         [SYS_PERM_REVOKE] = (syshandler_t) sys_perm_revoke,
     169        (syshandler_t) sys_ipc_event_subscribe,
     170        (syshandler_t) sys_ipc_event_unsubscribe,
     171        (syshandler_t) sys_ipc_event_unmask,
     172       
     173        /* Capabilities related syscalls. */
     174        (syshandler_t) sys_cap_grant,
     175        (syshandler_t) sys_cap_revoke,
    174176       
    175177        /* DDI related syscalls. */
    176         [SYS_PHYSMEM_MAP] = (syshandler_t) sys_physmem_map,
    177         [SYS_PHYSMEM_UNMAP] = (syshandler_t) sys_physmem_unmap,
    178         [SYS_DMAMEM_MAP] = (syshandler_t) sys_dmamem_map,
    179         [SYS_DMAMEM_UNMAP] = (syshandler_t) sys_dmamem_unmap,
    180         [SYS_IOSPACE_ENABLE] = (syshandler_t) sys_iospace_enable,
    181         [SYS_IOSPACE_DISABLE] = (syshandler_t) sys_iospace_disable,
    182        
    183         [SYS_IPC_IRQ_SUBSCRIBE] = (syshandler_t) sys_ipc_irq_subscribe,
    184         [SYS_IPC_IRQ_UNSUBSCRIBE] = (syshandler_t) sys_ipc_irq_unsubscribe,
     178        (syshandler_t) sys_device_assign_devno,
     179        (syshandler_t) sys_physmem_map,
     180        (syshandler_t) sys_physmem_unmap,
     181        (syshandler_t) sys_dmamem_map,
     182        (syshandler_t) sys_dmamem_unmap,
     183        (syshandler_t) sys_iospace_enable,
     184        (syshandler_t) sys_iospace_disable,
     185       
     186        (syshandler_t) sys_ipc_irq_subscribe,
     187        (syshandler_t) sys_ipc_irq_unsubscribe,
    185188       
    186189        /* Sysinfo syscalls. */
    187         [SYS_SYSINFO_GET_KEYS_SIZE] = (syshandler_t) sys_sysinfo_get_keys_size,
    188         [SYS_SYSINFO_GET_KEYS] = (syshandler_t) sys_sysinfo_get_keys,
    189         [SYS_SYSINFO_GET_VAL_TYPE] = (syshandler_t) sys_sysinfo_get_val_type,
    190         [SYS_SYSINFO_GET_VALUE] = (syshandler_t) sys_sysinfo_get_value,
    191         [SYS_SYSINFO_GET_DATA_SIZE] = (syshandler_t) sys_sysinfo_get_data_size,
    192         [SYS_SYSINFO_GET_DATA] = (syshandler_t) sys_sysinfo_get_data,
     190        (syshandler_t) sys_sysinfo_get_keys_size,
     191        (syshandler_t) sys_sysinfo_get_keys,
     192        (syshandler_t) sys_sysinfo_get_val_type,
     193        (syshandler_t) sys_sysinfo_get_value,
     194        (syshandler_t) sys_sysinfo_get_data_size,
     195        (syshandler_t) sys_sysinfo_get_data,
    193196       
    194197        /* Kernel console syscalls. */
    195         [SYS_DEBUG_CONSOLE] = (syshandler_t) sys_debug_console,
    196        
    197         [SYS_KLOG] = (syshandler_t) sys_klog,
     198        (syshandler_t) sys_debug_console,
     199       
     200        (syshandler_t) sys_klog,
    198201};
    199202
Note: See TracChangeset for help on using the changeset viewer.