Changeset e686744c in mainline


Ignore:
Timestamp:
2007-11-16T16:15:33Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
296426ad
Parents:
2829b354
Message:

Start support for six syscall arguments.
This breaks all architectures.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/syscall/syscall.h

    r2829b354 re686744c  
    3838typedef enum {
    3939        SYS_IO = 0,
    40         SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - psthread.S */
     40        SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - fibril.S */
    4141        SYS_THREAD_CREATE,
    4242        SYS_THREAD_EXIT,
     
    7474#include <arch/types.h>
    7575
    76 typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t);
     76typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t,
     77    unative_t, unative_t);
    7778
    7879extern syshandler_t syscall_table[SYSCALL_END];
    79 extern unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
    80                                 unative_t a4, unative_t id);
    81 extern unative_t sys_tls_set(unative_t addr);
     80extern unative_t syscall_handler(unative_t, unative_t, unative_t, unative_t,
     81    unative_t, unative_t, unative_t);
     82extern unative_t sys_tls_set(unative_t);
    8283
    8384#endif
  • kernel/generic/src/syscall/syscall.c

    r2829b354 re686744c  
    9393
    9494/** Dispatch system call */
    95 unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3, unative_t a4,
    96     unative_t id)
     95unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
     96    unative_t a4, unative_t a5, unative_t a6, unative_t id)
    9797{
    9898        unative_t rc;
    9999
    100100        if (id < SYSCALL_END)
    101                 rc = syscall_table[id](a1, a2, a3, a4);
     101                rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
    102102        else {
    103                 klog_printf("TASK %llu: Unknown syscall id %d", TASK->taskid,
     103                klog_printf("TASK %llu: Unknown syscall id %llx", TASK->taskid,
    104104                    id);
    105105                task_kill(TASK->taskid);
  • uspace/lib/libc/include/libc.h

    r2829b354 re686744c  
    4040#include <libarch/syscall.h>
    4141
    42 #define __SYSCALL0(id) __syscall(0, 0, 0, 0, id)
    43 #define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, id)
    44 #define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, id)
    45 #define __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, id)
    46 #define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, id)
     42#define __SYSCALL0(id) __syscall(0, 0, 0, 0, 0, 0, id)
     43#define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, 0, 0, id)
     44#define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, 0, 0, id)
     45#define __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, 0, 0, id)
     46#define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, 0, 0, id)
     47#define __SYSCALL5(id, p1, p2, p3, p4, p5) __syscall(p1, p2, p3, p4, p5, 0, id)
     48#define __SYSCALL6(id, p1, p2, p3, p4, p5, p6) \
     49    __syscall(p1, p2, p3, p4, p5, p6,id)
    4750
    4851extern void __main(void);
  • uspace/lib/libc/include/syscall.h

    r2829b354 re686744c  
    3232/**
    3333 * @file
    34  * @brief       Syscall function declaration for architectures that don't inline syscalls.
     34 * @brief       Syscall function declaration for architectures that don't
     35 *              inline syscalls.
    3536 */
    3637
     
    4142#include <kernel/syscall/syscall.h>
    4243
    43 extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id);
     44extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
     45    const sysarg_t p3, const sysarg_t p4, const sysarg_t p5, const sysarg_t p6,
     46    const syscall_t id);
    4447
    4548#endif
Note: See TracChangeset for help on using the changeset viewer.