# syscalls.h

    00001 /**************************************************************************************
    00002  Copyright (c) 2002 The UbixOS Project
    00003  All rights reserved.
    00004
    00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    00006
    00007 Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.
    00008 Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors
    00009 in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its
    00010 contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    00011
    00012 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
    00013 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    00014 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    00015 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    00016 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    00017 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    00018 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00019
    00020  $Id$
    00021
    00022 **************************************************************************************/
    00023
    00024 #ifndef _SYSCALLS_H
    00025 #define _SYSCALLS_H
    00026
    00027 #include <ubixos/sched.h>
    00028 #include <vfs/file.h>
    00029
    00030 void sysGetpid();
    00031 void sysExit();
    00032 void sysExec();
    00033 void sysFork();
    00034 void sysCheckPid();
    00035 void sysGetFreePage();
    00036
    00037 void sysFwrite();
    00038 void sysFgetc();
    00039 void sysFopen();
    00040 void sysFread();
    00041 void sysFclose();
    00042 void sysSchedYield();
    00043 void sysFseek();
    00044 void sysMkDir();
    00045 void sysRmDir();
    00046 void sysGetUid();
    00047 void sysGetGid();
    00048 void sysSetUid();
    00049 void sysSetGid();
    00050 void sysSDE();
    00051 void sysGetDrives();
    00052 void sysGetCwd();
    00053 void sysChDir();
    00054 void sysGetUptime();
    00055 void sysGetTime();
    00056 void sysStartSDE();
    00057 void sysUnlink();
    00058
    00059 typedef void (*functionPTR)();
    00060
    00061 functionPTR systemCalls[] = {
    00062   invalidCall,
    00063   sysGetpid,
    00064   sysExit,
    00065   sysExec,
    00066   sysFork,
    00067   sysFgetc,
    00068   sysCheckPid,
    00069   sysGetFreePage,
    00070   sysFopen,
    00071   invalidCall,
    00072   sysFclose,
    00073   sysSchedYield,
    00074   invalidCall,
    00075   invalidCall,
    00076   invalidCall,
    00077   invalidCall,
    00078   invalidCall,
    00079   invalidCall,
    00080   invalidCall,
    00081   invalidCall,
    00082   sysFopen,
    00083   sysFclose,
    00084   sysFread,
    00085   sysFwrite,
    00086   sysMkDir,
    00087   sysRmDir,
    00088   sysGetCwd,
    00089   sysFseek,
    00090   sysChDir,
    00091   sysMkDir,
    00092   sysUnlink,
    00093   sysGetUid,
    00094   sysGetGid,
    00095   sysSetUid,
    00096   sysSetGid,
    00097   invalidCall,
    00098   invalidCall,
    00099   invalidCall,
    00100   invalidCall,
    00101   invalidCall,
    00102   sysSDE,
    00103   invalidCall,
    00104   invalidCall,
    00105   invalidCall,
    00106   invalidCall,
    00107   sysGetDrives,
    00108   sysGetUptime,
    00109   sysGetTime,
    00110   sysStartSDE,
    00111   };
    00112
    00113 int totalCalls = sizeof(systemCalls)/sizeof(functionPTR);
    00114
    00115 #endif
    00116