Main Page | Directories | File List | Globals

syscalls.c

Go to the documentation of this file.
00001 /*
00002  * kernel_sys/syscalls.c
00003  *
00004  * Copyright (c) 2003-2004 Lukasz Dembinski <dembol@nasa.com.pl>
00005  * All Rights Reserved
00006  * 
00007  * Date:        2004/01
00008  * Author:      Lukasz Dembinski
00009  * Info:        syscalls.c core file
00010  * Contact:     mailto: <dembol@nasa.com.pl>
00011  *
00012  */
00013 
00014 #include <agnix/agnix.h>
00015 #include <agnix/syscalls.h>
00016 #include <agnix/errno.h>
00017 
00018 #define MOD_NAME        "SYSCALLS: "
00019 
00020 SYS_CALL(fork) 
00021 {
00022     return do_sys_fork(regs);
00023 }
00024 
00025 SYS_CALL(exit) 
00026 {
00027     return do_sys_exit((int)(regs->ebx));
00028 }
00029 
00030 SYS_CALL(nice) 
00031 {
00032     return do_sys_nice((int)(regs->ebx));
00033 }
00034 
00035 SYS_CALL(getpid) 
00036 {
00037     return do_sys_getpid();
00038 }
00039 
00040 SYS_CALL(gettimeofday) 
00041 {
00042     return timer_gettimeofday((struct timeval_s *)(regs->ebx));
00043 }
00044 
00045 SYS_CALL(settimeofday) 
00046 {
00047     return timer_settimeofday((struct timeval_s *)(regs->ebx));
00048 }
00049 
00050 SYS_CALL(kill) 
00051 {
00052     return do_sys_kill((int)(regs->ebx), (int)(regs->ecx));
00053 }
00054 
00055 SYS_CALL(setuid) 
00056 {
00057     return 0;
00058 }
00059 
00060 SYS_CALL(getuid) 
00061 {
00062     return 0;
00063 }
00064 
00065 SYS_CALL(setgid) 
00066 {
00067     return 0;
00068 }
00069 
00070 SYS_CALL(getgid) 
00071 {
00072     return 0;
00073 }
00074 
00075 SYS_CALL(sigaction) 
00076 {
00077     return do_sys_sigaction((int)(regs->ebx), (struct sigaction_s *)(regs->ecx), 
00078                             (struct sigaction_s *)(regs->edx));
00079 }
00080 
00081 SYS_CALL(sigreturn) 
00082 {
00083     return do_sys_sigreturn((int)(regs->ebx));
00084 }
00085 
00086 SYS_CALL(setitimer) 
00087 {
00088     return do_sys_setitimer((int)(regs->ebx), (struct itimerval_s *)(regs->ecx),
00089                             (struct itimerval_s *)(regs->edx));
00090 }
00091 
00092 SYS_CALL(getitimer) 
00093 {
00094     return do_sys_getitimer((int)(regs->ebx), (struct itimerval_s *)(regs->ecx));
00095 }
00096 
00097 SYS_CALL(time)
00098 {
00099     return do_sys_time((int *)(regs->ebx));
00100 }
00101 
00102 SYS_CALL(stime)
00103 {
00104     return do_sys_stime((int *)(regs->ebx));
00105 }
00106 
00107 SYS_CALL(read)
00108 {
00109     return do_sys_read((int)(regs->ebx), (char *)(regs->ecx), (int)(regs->edx));
00110 }
00111 
00112 SYS_CALL(write)
00113 {
00114     return do_sys_write((int)(regs->ebx), (char *)(regs->ecx), (int)(regs->edx));
00115 }
00116 
00117 SYS_CALL(open)
00118 {
00119     return do_sys_open((char *)(regs->ebx), (int)(regs->ecx), (int)(regs->edx));
00120 }
00121 
00122 SYS_CALL(not_implemented)
00123 {
00124     return -ENOSYS;
00125 }
Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix