Changeset 4be51c8 in mainline


Ignore:
Timestamp:
2006-01-15T17:38:16Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd537a0
Parents:
204674e
Message:

syscall handler return value
uspace task termination (primitive)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/interrupt.c

    r204674e r4be51c8  
    117117       
    118118        if (stack[-2] < SYSCALL_END)
    119                 syscall_table[stack[-2]](stack[-5], stack[-3], stack[-4]);
     119                stack[-2] = syscall_table[stack[-2]](stack[-5], stack[-3], stack[-4]);
    120120        else
    121121                panic("Undefined syscall %d", stack[-2]);
  • generic/src/syscall/syscall.c

    r204674e r4be51c8  
    2828
    2929#include <syscall/syscall.h>
     30#include <proc/thread.h>
    3031#include <print.h>
    3132#include <putchar.h>
    3233
    3334int sys_ctl(void) {
    34         printf("SYS_CTL\n");
     35        printf("Thread finished\n");
     36        thread_exit();
     37        /* Unreachable */
    3538        return 0;
    3639}
     
    4548                putchar(((char *) buf)[i]);
    4649       
    47         return 0;
     50        return count;
    4851}
    4952
Note: See TracChangeset for help on using the changeset viewer.