os161-1.99
 All Data Structures
syscall.h
00001 /*
00002  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008
00003  *      The President and Fellows of Harvard College.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the University nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  */
00029 
00030 #ifndef _KERN_SYSCALL_H_
00031 #define _KERN_SYSCALL_H_
00032 
00033 /*
00034  * System call numbers.
00035  *
00036  * To foster compatibility, this file contains a number for every
00037  * more-or-less standard Unix system call that someone might
00038  * conceivably implement on OS/161. The commented-out ones are ones
00039  * we're pretty sure you won't be implementing. The others, you might
00040  * or might not. Check your own course materials to find out what's
00041  * specifically required of you.
00042  *
00043  * Caution: this file is parsed by a shell script to generate the assembly
00044  * language system call stubs. Don't add weird stuff between the markers.
00045  */
00046 
00047 /*CALLBEGIN*/
00048 
00049 //                              -- Process-related --
00050 #define SYS_fork         0
00051 #define SYS_vfork        1
00052 #define SYS_execv        2
00053 #define SYS__exit        3
00054 #define SYS_waitpid      4
00055 #define SYS_getpid       5
00056 #define SYS_getppid      6
00057 //                              (virtual memory)
00058 #define SYS_sbrk         7
00059 #define SYS_mmap         8
00060 #define SYS_munmap       9
00061 #define SYS_mprotect     10
00062 //#define SYS_madvise    11
00063 //#define SYS_mincore    12
00064 //#define SYS_mlock      13
00065 //#define SYS_munlock    14
00066 //#define SYS_munlockall 15
00067 //#define SYS_minherit   16
00068 //                              (security/credentials)
00069 #define SYS_umask        17
00070 #define SYS_issetugid    18
00071 #define SYS_getresuid    19
00072 #define SYS_setresuid    20
00073 #define SYS_getresgid    21
00074 #define SYS_setresgid    22
00075 #define SYS_getgroups    23
00076 #define SYS_setgroups    24
00077 #define SYS___getlogin   25
00078 #define SYS___setlogin   26
00079 //                              (signals)
00080 #define SYS_kill         27
00081 #define SYS_sigaction    28
00082 #define SYS_sigpending   29
00083 #define SYS_sigprocmask  30
00084 #define SYS_sigsuspend   31
00085 #define SYS_sigreturn    32
00086 //#define SYS_sigaltstack 33
00087 //                              (resource tracking and usage)
00088 //#define SYS_wait4      34
00089 //#define SYS_getrusage  35
00090 //                              (resource limits)
00091 //#define SYS_getrlimit  36
00092 //#define SYS_setrlimit  37
00093 //                              (process priority control)
00094 //#define SYS_getpriority 38
00095 //#define SYS_setpriority 39
00096 //                              (process groups, sessions, and job control)
00097 //#define SYS_getpgid    40
00098 //#define SYS_setpgid    41
00099 //#define SYS_getsid     42
00100 //#define SYS_setsid     43
00101 //                              (userlevel debugging)
00102 //#define SYS_ptrace     44
00103 
00104 //                              -- File-handle-related --
00105 #define SYS_open         45
00106 #define SYS_pipe         46
00107 #define SYS_dup          47
00108 #define SYS_dup2         48
00109 #define SYS_close        49
00110 #define SYS_read         50
00111 #define SYS_pread        51
00112 //#define SYS_readv      52
00113 //#define SYS_preadv     53
00114 #define SYS_getdirentry  54
00115 #define SYS_write        55
00116 #define SYS_pwrite       56
00117 //#define SYS_writev     57
00118 //#define SYS_pwritev    58
00119 #define SYS_lseek        59
00120 #define SYS_flock        60
00121 #define SYS_ftruncate    61
00122 #define SYS_fsync        62
00123 #define SYS_fcntl        63
00124 #define SYS_ioctl        64
00125 #define SYS_select       65
00126 #define SYS_poll         66
00127 
00128 //                              -- Pathname-related --
00129 #define SYS_link         67
00130 #define SYS_remove       68
00131 #define SYS_mkdir        69
00132 #define SYS_rmdir        70
00133 #define SYS_mkfifo       71
00134 #define SYS_rename       72
00135 #define SYS_access       73
00136 //                              (current directory)
00137 #define SYS_chdir        74
00138 #define SYS_fchdir       75
00139 #define SYS___getcwd     76
00140 //                              (symbolic links)
00141 #define SYS_symlink      77
00142 #define SYS_readlink     78
00143 //                              (mount)
00144 #define SYS_mount        79
00145 #define SYS_unmount      80
00146 
00147 
00148 //                              -- Any-file-related --
00149 #define SYS_stat         81
00150 #define SYS_fstat        82
00151 #define SYS_lstat        83
00152 //                              (timestamps)
00153 #define SYS_utimes       84
00154 #define SYS_futimes      85
00155 #define SYS_lutimes      86
00156 //                              (security/permissions)
00157 #define SYS_chmod        87
00158 #define SYS_chown        88
00159 #define SYS_fchmod       89
00160 #define SYS_fchown       90
00161 #define SYS_lchmod       91
00162 #define SYS_lchown       92
00163 //                              (file system info)
00164 //#define SYS_statfs     93
00165 //#define SYS_fstatfs    94
00166 //#define SYS_getfsstat  95
00167 //                              (POSIX dynamic system limits stuff)
00168 //#define SYS_pathconf   96
00169 //#define SYS_fpathconf  97
00170 
00171 //                              -- Sockets and networking --
00172 #define SYS_socket       98
00173 #define SYS_bind         99
00174 #define SYS_connect      100
00175 #define SYS_listen       101
00176 #define SYS_accept       102
00177 //#define SYS_socketpair 103
00178 #define SYS_shutdown     104
00179 #define SYS_getsockname  105
00180 #define SYS_getpeername  106
00181 #define SYS_getsockopt   107
00182 #define SYS_setsockopt   108
00183 //#define SYS_recvfrom   109
00184 //#define SYS_sendto     110
00185 //#define SYS_recvmsg    111
00186 //#define SYS_sendmsg    112
00187 
00188 //                              -- Time-related --
00189 #define SYS___time       113
00190 #define SYS___settime    114
00191 #define SYS_nanosleep    115
00192 //#define SYS_getitimer  116
00193 //#define SYS_setitimer  117
00194 
00195 //                              -- Other --
00196 #define SYS_sync         118
00197 #define SYS_reboot       119
00198 //#define SYS___sysctl   120
00199 
00200 /*CALLEND*/
00201 
00202 
00203 #endif /* _KERN_SYSCALL_H_ */
 All Data Structures