Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/libc/syscall.h

Go to the documentation of this file.
00001 /*  src_experimental/libc/syscall.h
00002     CubeOS Version 0.4.90 experimental
00003     Copyright (C) 1999,2000 Holger Kenn
00004 
00005     CubeOS is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or any later version.
00009 
00010     CubeOS is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015 */  
00016 
00023 /* General use syscall.h file.
00024    The more ports that use this file, the simpler sim/common/nltvals.def
00025    remains.  */
00026 
00027 #ifndef LIBGLOSS_SYSCALL_H
00028 #define LIBGLOSS_SYSCALL_H
00029 
00030 /* Note: This file may be included by assembler source.  */
00031 
00032 /* These should be as small as possible to allow a port to use a trap type
00033    instruction, which the system call # as the trap (the d10v for instance
00034    supports traps 0..31).  An alternative would be to define one trap for doing
00035    system calls, and put the system call number in a register that is not used
00036    for the normal calling sequence (so that you don't have to shift down the
00037    arguments to add the system call number).  Obviously, if these system call
00038    numbers are ever changed, all of the simulators and potentially user code
00039    will need to be updated.  */
00040 
00041 /* There is no current need for the following: SYS_execv, SYS_creat, SYS_wait,
00042    etc. etc.  Don't add them.  */
00043 
00044 /* These are required by the ANSI C part of newlib (excluding system() of
00045    course).  */
00046 #define SYS_exit        1
00047 #define SYS_open        2
00048 #define SYS_close       3
00049 #define SYS_read        4
00050 #define SYS_write       5
00051 #define SYS_lseek       6
00052 #define SYS_unlink      7
00053 #define SYS_getpid      8
00054 #define SYS_kill        9
00055 #define SYS_fstat       10
00056 /*#define SYS_sbrk      11 - not currently a system call, but reserved.  */
00057 
00058 /* ARGV support.  */
00059 #define SYS_argvlen     12
00060 #define SYS_argv        13
00061 
00062 /* These are extras added for one reason or another.  */
00063 #define SYS_chdir       14
00064 #define SYS_stat        15
00065 #define SYS_chmod       16
00066 #define SYS_utime       17
00067 #define SYS_time        18
00068 
00069 #endif

Generated on Thu Feb 20 15:38:45 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002