root/kern/include/kern/syscall.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008
   3  *      The President and Fellows of Harvard College.
   4  *
   5  * Redistribution and use in source and binary forms, with or without
   6  * modification, are permitted provided that the following conditions
   7  * are met:
   8  * 1. Redistributions of source code must retain the above copyright
   9  *    notice, this list of conditions and the following disclaimer.
  10  * 2. Redistributions in binary form must reproduce the above copyright
  11  *    notice, this list of conditions and the following disclaimer in the
  12  *    documentation and/or other materials provided with the distribution.
  13  * 3. Neither the name of the University nor the names of its contributors
  14  *    may be used to endorse or promote products derived from this software
  15  *    without specific prior written permission.
  16  *
  17  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
  18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
  21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27  * SUCH DAMAGE.
  28  */
  29 
  30 #ifndef _KERN_SYSCALL_H_
  31 #define _KERN_SYSCALL_H_
  32 
  33 /*
  34  * System call numbers.
  35  *
  36  * To foster compatibility, this file contains a number for every
  37  * more-or-less standard Unix system call that someone might
  38  * conceivably implement on OS/161. The commented-out ones are ones
  39  * we're pretty sure you won't be implementing. The others, you might
  40  * or might not. Check your own course materials to find out what's
  41  * specifically required of you.
  42  *
  43  * Caution: this file is parsed by a shell script to generate the assembly
  44  * language system call stubs. Don't add weird stuff between the markers.
  45  */
  46 
  47 /*CALLBEGIN*/
  48 
  49 //                              -- Process-related --
  50 #define SYS_fork         0
  51 #define SYS_vfork        1
  52 #define SYS_execv        2
  53 #define SYS__exit        3
  54 #define SYS_waitpid      4
  55 #define SYS_getpid       5
  56 #define SYS_getppid      6
  57 //                              (virtual memory)
  58 #define SYS_sbrk         7
  59 #define SYS_mmap         8
  60 #define SYS_munmap       9
  61 #define SYS_mprotect     10
  62 //#define SYS_madvise    11
  63 //#define SYS_mincore    12
  64 //#define SYS_mlock      13
  65 //#define SYS_munlock    14
  66 //#define SYS_munlockall 15
  67 //#define SYS_minherit   16
  68 //                              (security/credentials)
  69 #define SYS_umask        17
  70 #define SYS_issetugid    18
  71 #define SYS_getresuid    19
  72 #define SYS_setresuid    20
  73 #define SYS_getresgid    21
  74 #define SYS_setresgid    22
  75 #define SYS_getgroups    23
  76 #define SYS_setgroups    24
  77 #define SYS___getlogin   25
  78 #define SYS___setlogin   26
  79 //                              (signals)
  80 #define SYS_kill         27
  81 #define SYS_sigaction    28
  82 #define SYS_sigpending   29
  83 #define SYS_sigprocmask  30
  84 #define SYS_sigsuspend   31
  85 #define SYS_sigreturn    32
  86 //#define SYS_sigaltstack 33
  87 //                              (resource tracking and usage)
  88 //#define SYS_wait4      34
  89 //#define SYS_getrusage  35
  90 //                              (resource limits)
  91 //#define SYS_getrlimit  36
  92 //#define SYS_setrlimit  37
  93 //                              (process priority control)
  94 //#define SYS_getpriority 38
  95 //#define SYS_setpriority 39
  96 //                              (process groups, sessions, and job control)
  97 //#define SYS_getpgid    40
  98 //#define SYS_setpgid    41
  99 //#define SYS_getsid     42
 100 //#define SYS_setsid     43
 101 //                              (userlevel debugging)
 102 //#define SYS_ptrace     44
 103 
 104 //                              -- File-handle-related --
 105 #define SYS_open         45
 106 #define SYS_pipe         46
 107 #define SYS_dup          47
 108 #define SYS_dup2         48
 109 #define SYS_close        49
 110 #define SYS_read         50
 111 #define SYS_pread        51
 112 //#define SYS_readv      52
 113 //#define SYS_preadv     53
 114 #define SYS_getdirentry  54
 115 #define SYS_write        55
 116 #define SYS_pwrite       56
 117 //#define SYS_writev     57
 118 //#define SYS_pwritev    58
 119 #define SYS_lseek        59
 120 #define SYS_flock        60
 121 #define SYS_ftruncate    61
 122 #define SYS_fsync        62
 123 #define SYS_fcntl        63
 124 #define SYS_ioctl        64
 125 #define SYS_select       65
 126 #define SYS_poll         66
 127 
 128 //                              -- Pathname-related --
 129 #define SYS_link         67
 130 #define SYS_remove       68
 131 #define SYS_mkdir        69
 132 #define SYS_rmdir        70
 133 #define SYS_mkfifo       71
 134 #define SYS_rename       72
 135 #define SYS_access       73
 136 //                              (current directory)
 137 #define SYS_chdir        74
 138 #define SYS_fchdir       75
 139 #define SYS___getcwd     76
 140 //                              (symbolic links)
 141 #define SYS_symlink      77
 142 #define SYS_readlink     78
 143 //                              (mount)
 144 #define SYS_mount        79
 145 #define SYS_unmount      80
 146 
 147 
 148 //                              -- Any-file-related --
 149 #define SYS_stat         81
 150 #define SYS_fstat        82
 151 #define SYS_lstat        83
 152 //                              (timestamps)
 153 #define SYS_utimes       84
 154 #define SYS_futimes      85
 155 #define SYS_lutimes      86
 156 //                              (security/permissions)
 157 #define SYS_chmod        87
 158 #define SYS_chown        88
 159 #define SYS_fchmod       89
 160 #define SYS_fchown       90
 161 #define SYS_lchmod       91
 162 #define SYS_lchown       92
 163 //                              (file system info)
 164 //#define SYS_statfs     93
 165 //#define SYS_fstatfs    94
 166 //#define SYS_getfsstat  95
 167 //                              (POSIX dynamic system limits stuff)
 168 //#define SYS_pathconf   96
 169 //#define SYS_fpathconf  97
 170 
 171 //                              -- Sockets and networking --
 172 #define SYS_socket       98
 173 #define SYS_bind         99
 174 #define SYS_connect      100
 175 #define SYS_listen       101
 176 #define SYS_accept       102
 177 //#define SYS_socketpair 103
 178 #define SYS_shutdown     104
 179 #define SYS_getsockname  105
 180 #define SYS_getpeername  106
 181 #define SYS_getsockopt   107
 182 #define SYS_setsockopt   108
 183 //#define SYS_recvfrom   109
 184 //#define SYS_sendto     110
 185 //#define SYS_recvmsg    111
 186 //#define SYS_sendmsg    112
 187 
 188 //                              -- Time-related --
 189 #define SYS___time       113
 190 #define SYS___settime    114
 191 #define SYS_nanosleep    115
 192 //#define SYS_getitimer  116
 193 //#define SYS_setitimer  117
 194 
 195 //                              -- Other --
 196 #define SYS_sync         118
 197 #define SYS_reboot       119
 198 //#define SYS___sysctl   120
 199 
 200 /*CALLEND*/
 201 
 202 
 203 #endif /* _KERN_SYSCALL_H_ */

/* [<][>][^][v][top][bottom][index][help] */