Annotation of Net2/arch/hp300/hpux/hpux_sysent.c, revision 1.1.1.2

1.1       root        1: /*
                      2:  * Copyright (c) 1988 University of Utah.
                      3:  * Copyright (c) 1990 The Regents of the University of California.
                      4:  * All rights reserved.
                      5:  *
                      6:  * This code is derived from software contributed to Berkeley by
                      7:  * the Systems Programming Group of the University of Utah Computer
                      8:  * Science Department.
                      9:  *
                     10:  * Redistribution and use in source and binary forms, with or without
                     11:  * modification, are permitted provided that the following conditions
                     12:  * are met:
                     13:  * 1. Redistributions of source code must retain the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer.
                     15:  * 2. Redistributions in binary form must reproduce the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer in the
                     17:  *    documentation and/or other materials provided with the distribution.
                     18:  * 3. All advertising materials mentioning features or use of this software
                     19:  *    must display the following acknowledgement:
                     20:  *     This product includes software developed by the University of
                     21:  *     California, Berkeley and its contributors.
                     22:  * 4. Neither the name of the University nor the names of its contributors
                     23:  *    may be used to endorse or promote products derived from this software
                     24:  *    without specific prior written permission.
                     25:  *
                     26:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     27:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     28:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     29:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     30:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     31:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     32:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     33:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     34:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     35:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     36:  * SUCH DAMAGE.
                     37:  *
                     38:  * from: Utah $Hdr: hpux_sysent.c 1.1 90/07/09$
                     39:  *
1.1.1.2 ! root       40:  *     from: @(#)hpux_sysent.c 7.7 (Berkeley) 4/20/91
        !            41:  *     hpux_sysent.c,v 1.2 1993/05/22 07:58:09 cgd Exp
1.1       root       42:  */
                     43: 
                     44: /*
                     45:  * System call switch table.
                     46:  */
                     47: 
                     48: #include "param.h"
                     49: #include "systm.h"
                     50: 
                     51: int    nosys(),notimp();
                     52: 
                     53: /* 1.1 processes and protection */
                     54: int    getpid();
                     55: int    hpuxgetdomainname(), hpuxsetdomainname();
                     56: int    fork(),rexit(),hpuxexecv(),execve();
                     57: int    getuid(),getgid(),getgroups(),setgroups();
                     58: int    setuid(),setgid();
                     59: 
                     60: /* 1.2 memory management */
                     61: 
                     62: /* 1.3 signals */
                     63: int    sigstack();
                     64: /* sigreturn is not HPUX, but we need it to make signals work */
                     65: int    sigreturn();
                     66: 
                     67: /* 1.4 timing and statistics */
                     68: int    gettimeofday(),settimeofday();
                     69: int    getitimer(),setitimer();
                     70: 
                     71: /* 1.5 descriptors */
                     72: int    dup2(),close();
                     73: int    select();
                     74: 
                     75: /* 1.6 resource controls */
                     76: 
                     77: /* 1.7 system operation support */
                     78: int    sync();
                     79: 
                     80: /* 2.2 file system */
                     81: int    chdir(),chroot();
                     82: int    mkdir(),rmdir(),getdirentries();
                     83: int    ocreat(),mknod(),unlink();
                     84: int    chown(),fchown(),chmod(),fchmod();
                     85: int    link(),symlink(),readlink(),rename();
                     86: int    lseek(),truncate(),ftruncate(),saccess(),fsync();
                     87: 
                     88: /* 2.3 communications */
                     89: int    pipe();
                     90: 
                     91: int    umask();                /* XXX */
                     92: 
                     93: /* 2.4 processes */
                     94: 
                     95: /* 2.5 terminals */
                     96: 
                     97: /* HPUX junk */
                     98: int    hpuxwait(),hpuxdup(),hpuxutssys(),hpuxulimit();
                     99: int    hpuxadvise(), hpuxstat(), hpuxfstat(), hpuxlstat();
                    100: int    hpuxsigvec(), hpuxsigblock(), hpuxsigsetmask();
                    101: int    hpuxsigpause(), hpuxkill(), hpuxptrace();
                    102: int    hpuxopen(), hpuxfcntl(), hpuxread(), hpuxwrite();
                    103: int    hpuxreadv(), hpuxwritev(), hpuxioctl();
                    104: int    hpuxnetioctl(), hpuxrtprio();
                    105: int    hpuxgetcontext();
                    106: int    hpuxlockf(), hpuxgetpgrp2(), hpuxsetpgrp2();
                    107: int     hpuxsetresuid(), hpuxsetresgid();
                    108: int    hpuxsigprocmask(), hpuxsigaction(), hpuxsigpending(), hpuxsigsuspend();
                    109: int    hpuxwait3(), hpuxwaitpid();
                    110: int    hpuxgetaccess();
                    111: #ifdef SYSVSHM
                    112: int    hpuxshmctl(),hpuxshmget(),hpuxshmat(),hpuxshmdt();
                    113: #endif
                    114: int    hpuxsemctl(),hpuxsemget(),hpuxsemop();
                    115: 
                    116: /*
                    117:  * Old 4.2 compatibility routines.
                    118:  * Still needed for HP-UX?
                    119:  */
                    120: #define        compat(n, name) n, __CONCAT(o,name)
                    121: 
                    122: int    ohpuxtime();            /* now use gettimeofday */
                    123: int    ohpuxstime();           /* now use settimeofday */
                    124: int    ohpuxalarm();           /* now use setitimer */
                    125: int    ohpuxutime();           /* now use utimes */
                    126: int    ohpuxpause();           /* now use sigpause */
                    127: int    ohpuxnice();            /* now use setpriority,getpriority */
                    128: int    ohpuxftime();           /* now use gettimeofday */
                    129: int    ohpuxtimes();           /* now use getrusage */
                    130: int    ohpuxstat();            /* now use stat */
                    131: int    ohpuxfstat();           /* now use fstat */
                    132: int    ohpuxssig();            /* now use sigvec, etc */
                    133: int    ohpuxgtty();            /* now use hpuxioctl */
                    134: int    ohpuxstty();            /* now use hpuxioctl */
                    135: int    ohpuxsetpgrp();         /* SYS5 style setpgrp */
                    136: 
                    137: /* BEGIN JUNK */
                    138: int    profil();               /* 'cuz sys calls are interruptible */
                    139: int    vfork();                /* awaiting fork w/ copy on write */
                    140: int    obreak();               /* awaiting new sbrk */
                    141: /* END JUNK */
                    142: 
                    143: /*
                    144:  * Reserved/unimplemented system calls in the range 0-150 inclusive
                    145:  * are reserved for use in future Berkeley releases.
                    146:  * Additional system calls implemented in vendor and other
                    147:  * redistributions should be placed in the reserved range at the end
                    148:  * of the current calls.
                    149:  */
                    150: struct sysent hpuxsysent[] = {
                    151:        0, nosys,                       /*   0 = out of range */
                    152:        1, rexit,                       /*   1 = exit */
                    153:        0, fork,                        /*   2 = fork */
                    154:        3, hpuxread,                    /*   3 = read */
                    155:        3, hpuxwrite,                   /*   4 = write */
                    156:        3, hpuxopen,                    /*   5 = open */
                    157:        1, close,                       /*   6 = close */
                    158:        1, hpuxwait,                    /*   7 = HPUX style wait */
                    159:        2, ocreat,                      /*   8 = ocreat */
                    160:        2, link,                        /*   9 = link */
                    161:        1, unlink,                      /*  10 = unlink */
                    162:        2, hpuxexecv,                   /*  11 = execv */
                    163:        1, chdir,                       /*  12 = chdir */
                    164:        compat(1,hpuxtime),             /*  13 = old time */
                    165:        3, mknod,                       /*  14 = mknod */
                    166:        2, chmod,                       /*  15 = chmod */
                    167:        3, chown,                       /*  16 = chown; now 3 args */
                    168:        1, obreak,                      /*  17 = old break */
                    169:        compat(2,hpuxstat),             /*  18 = old stat */
                    170:        3, lseek,                       /*  19 = lseek */
                    171:        0, getpid,                      /*  20 = getpid */
                    172:        3, notimp,                      /*  21 = mount */
                    173:        1, notimp,                      /*  22 = umount */
                    174:        1, setuid,                      /*  23 = setuid */
                    175:        0, getuid,                      /*  24 = getuid */
                    176:        compat(1,hpuxstime),            /*  25 = old stime */
                    177:        4, hpuxptrace,                  /*  26 = ptrace */
                    178:        compat(1,hpuxalarm),            /*  27 = old alarm */
                    179:        compat(2,hpuxfstat),            /*  28 = old fstat */
                    180:        compat(0,hpuxpause),            /*  29 = opause */
                    181:        compat(2,hpuxutime),            /*  30 = old utime */
                    182:        compat(2,hpuxstty),             /*  31 = HPUX style stty */
                    183:        compat(2,hpuxgtty),             /*  32 = HPUX style gtty */
                    184:        2, saccess,                     /*  33 = access */
                    185:        compat(1,hpuxnice),             /*  34 = old nice */
                    186:        compat(1,hpuxftime),            /*  35 = old ftime */
                    187:        0, sync,                        /*  36 = sync */
                    188:        2, hpuxkill,                    /*  37 = HPUX style kill */
                    189:        2, hpuxstat,                    /*  38 = HPUX style stat */
                    190:        compat(1,hpuxsetpgrp),          /*  39 = HPUX style old setpgrp */
                    191:        2, hpuxlstat,                   /*  40 = HPUX style lstat */
                    192:        1, hpuxdup,                     /*  41 = HPUX style dup */
                    193:        0, pipe,                        /*  42 = pipe */
                    194:        compat(1,hpuxtimes),            /*  43 = old times */
                    195:        4, profil,                      /*  44 = profil */
                    196:        4, notimp,                      /*  45 = ki_syscall */
                    197:        1, setgid,                      /*  46 = setgid */
                    198:        0, getgid,                      /*  47 = getgid */
                    199:        compat(2,hpuxssig),             /*  48 = old sig */
                    200:        0, nosys,                       /*  49 = reserved for USG */
                    201:        0, nosys,                       /*  50 = reserved for USG */
                    202:        1, notimp,                      /*  51 = acct */
                    203:        0, nosys,                       /*  52 = old set phys addr */
                    204:        0, nosys,                       /*  53 = old lock in core */
                    205:        3, hpuxioctl,                   /*  54 = HPUX ioctl */
                    206:        4, notimp,                      /*  55 = reboot */
                    207:        2, symlink,                     /*  56 = symlink */
                    208:        3, hpuxutssys,                  /*  57 = HPUX utssys */
                    209:        3, readlink,                    /*  58 = readlink */
                    210:        3, execve,                      /*  59 = execve */
                    211:        1, umask,                       /*  60 = umask */
                    212:        1, chroot,                      /*  61 = chroot */
                    213:        3, hpuxfcntl,                   /*  62 = fcntl (swapped with fstat) */
                    214:        2, hpuxulimit,                  /*  63 = HPUX ulimit */
                    215:        0, nosys,                       /*  64 = nosys */
                    216:        0, nosys,                       /*  65 = nosys */
                    217:        0, vfork,                       /*  66 = vfork */
                    218:        0, hpuxread,                    /*  67 = old vread */
                    219:        0, hpuxwrite,                   /*  68 = old vwrite */
                    220:        0, nosys,                       /*  69 = nosys */
                    221:        0, nosys,                       /*  70 = nosys */
                    222:        0, nosys,                       /*  71 = nosys */
                    223:        0, nosys,                       /*  72 = nosys */
                    224:        0, nosys,                       /*  73 = nosys */
                    225:        3, notimp,                      /*  74 = mprotect */
                    226:        0, nosys,                       /*  75 = nosys */
                    227:        0, nosys,                       /*  76 = nosys */
                    228:        0, nosys,                       /*  77 = nosys */
                    229:        0, nosys,                       /*  78 = nosys */
                    230:        2, getgroups,                   /*  79 = getgroups */
                    231:        2, setgroups,                   /*  80 = setgroups */
                    232:        1, hpuxgetpgrp2,                /*  81 = HPUX getpgrp2 */
                    233:        2, hpuxsetpgrp2,                /*  82 = HPUX setpgrp2 */
                    234:        3, setitimer,                   /*  83 = setitimer */
                    235:        3, hpuxwait3,                   /*  84 = wait3 */
                    236:        1, notimp,                      /*  85 = swapon */
                    237:        2, getitimer,                   /*  86 = getitimer */
                    238:        0, nosys,                       /*  87 = nosys */
                    239:        0, nosys,                       /*  88 = nosys */
                    240:        0, nosys,                       /*  89 = nosys */
                    241:        2, dup2,                        /*  90 = dup2 */
                    242:        2, nosys,                       /*  91 = nosys */
                    243:        2, hpuxfstat,                   /*  92 = fstat (swapped with fcntl) */
                    244:        5, select,                      /*  93 = select */
                    245:        0, nosys,                       /*  94 = nosys */
                    246:        1, fsync,                       /*  95 = fsync */
                    247:        0, nosys,                       /*  96 = nosys */
                    248:        3, nosys,                       /*  97 = nosys */
                    249:        2, nosys,                       /*  98 = nosys */
                    250:        2, nosys,                       /*  99 = nosys */
                    251:        0, nosys,                       /* 100 = nosys */
                    252:        0, nosys,                       /* 101 = nosys */
                    253:        0, nosys,                       /* 102 = nosys */
                    254:        1, sigreturn,                   /* 103 = sigreturn (not HPUX) */
                    255:        2, nosys,                       /* 104 = nosys */
                    256:        0, nosys,                       /* 105 = nosys */
                    257:        0, nosys,                       /* 106 = nosys */
                    258:        0, nosys,                       /* 107 = nosys */
                    259:        3, hpuxsigvec,                  /* 108 = sigvec */
                    260:        1, hpuxsigblock,                /* 109 = sigblock */
                    261:        1, hpuxsigsetmask,              /* 110 = sigsetmask */
                    262:        1, hpuxsigpause,                /* 111 = sigpause */
                    263:        2, sigstack,                    /* 112 = sigstack */
                    264:        0, nosys,                       /* 113 = nosys */
                    265:        0, nosys,                       /* 114 = nosys */
                    266:        0, nosys,                       /* 115 = nosys */
                    267:        2, gettimeofday,                /* 116 = gettimeofday */
                    268:        0, nosys,                       /* 117 = nosys */
                    269:        0, nosys,                       /* 118 = nosys */
                    270:        3, notimp,                      /* 119 = hpib_io_stub */
                    271:        3, hpuxreadv,                   /* 120 = readv */
                    272:        3, hpuxwritev,                  /* 121 = writev */
                    273:        2, settimeofday,                /* 122 = settimeofday */
                    274:        3, fchown,                      /* 123 = fchown */
                    275:        2, fchmod,                      /* 124 = fchmod */
                    276:        0, nosys,                       /* 125 = nosys */
                    277:        3, hpuxsetresuid,               /* 126 = setresuid */
                    278:        3, hpuxsetresgid,               /* 127 = setresgid */
                    279:        2, rename,                      /* 128 = rename */
                    280:        2, truncate,                    /* 129 = truncate */
                    281:        2, ftruncate,                   /* 130 = ftruncate */
                    282:        0, nosys,                       /* 131 = nosys */
                    283:        1, notimp,                      /* 132 = sysconf */
                    284:        0, nosys,                       /* 133 = nosys */
                    285:        0, nosys,                       /* 134 = nosys */
                    286:        0, nosys,                       /* 135 = nosys */
                    287:        2, mkdir,                       /* 136 = mkdir */
                    288:        1, rmdir,                       /* 137 = rmdir */
                    289:        0, nosys,                       /* 138 = nosys */
                    290:        0, nosys,                       /* 139 = internal (4.2 sigreturn) */
                    291:        0, nosys,                       /* 140 = nosys */
                    292:        0, nosys,                       /* 141 = nosys */
                    293:        0, nosys,                       /* 142 = nosys */
                    294:        0, nosys,                       /* 143 = nosys */
                    295:        0, nosys,                       /* 144 = nosys */
                    296:        0, nosys,                       /* 145 = nosys */
                    297:        0, nosys,                       /* 146 = nosys */
                    298:        0, nosys,                       /* 147 = nosys */
                    299:        0, nosys,                       /* 148 = nosys */
                    300:        0, nosys,                       /* 149 = nosys */
                    301:        0, nosys,                       /* 150 = nosys */
                    302:        /*
                    303:         * HPUX specific syscalls
                    304:         */
                    305:        3, notimp,                      /* 151 = privgrp */
                    306:        2, hpuxrtprio,                  /* 152 = rtprio */
                    307:        1, notimp,                      /* 153 = plock */
                    308:        2, hpuxnetioctl,                /* 154 = BSD networking */
                    309:        4, hpuxlockf,                   /* 155 = HPUX lockf */
                    310:        3, hpuxsemget,                  /* 156 = semget */
                    311:        4, hpuxsemctl,                  /* 157 = semctl */
                    312:        3, hpuxsemop,                   /* 158 = semop */
                    313:        2, notimp,                      /* 159 = msgget */
                    314:        3, notimp,                      /* 160 = msgctl */
                    315:        4, notimp,                      /* 161 = msgsnd */
                    316:        5, notimp,                      /* 162 = msgrcv */
                    317: #ifdef SYSVSHM
                    318:        3, hpuxshmget,                  /* 163 = shmget */
                    319:        3, hpuxshmctl,                  /* 164 = shmctl */
                    320:        3, hpuxshmat,                   /* 165 = shmat */
                    321:        1, hpuxshmdt,                   /* 166 = shmdt */
                    322: #else
                    323:        3, notimp,                      /* 163 = shmget */
                    324:        3, notimp,                      /* 164 = shmctl */
                    325:        3, notimp,                      /* 165 = shmat */
                    326:        1, notimp,                      /* 166 = shmdt */
                    327: #endif
                    328:        1, hpuxadvise,                  /* 167 = m68020_advise */
                    329:        0, notimp,                      /* 168 = dux_notconfigured */
                    330:        3, notimp,                      /* 169 = cluster */
                    331:        4, notimp,                      /* 170 = mkrnod */
                    332:        0, nosys,                       /* 171 = nosys */
                    333:        0, notimp,                      /* 172 = dux_notconfigured */
                    334:        0, nosys,                       /* 173 = nosys */
                    335:        3, hpuxgetcontext,              /* 174 = getcontext */
                    336:        0, nosys,                       /* 175 = nosys */
                    337:        0, nosys,                       /* 176 = nosys */
                    338:        0, nosys,                       /* 177 = nosys */
                    339:        0, notimp,                      /* 178 = lsync */
                    340:        0, nosys,                       /* 179 = nosys */
                    341:        0, notimp,                      /* 180 = mysite */
                    342:        0, notimp,                      /* 181 = returnzero */
                    343:        0, nosys,                       /* 182 = nosys */
                    344:        0, nosys,                       /* 183 = nosys */
                    345:        0, nosys,                       /* 184 = nosys */
                    346:        0, nosys,                       /* 185 = nosys */
                    347:        3, notimp,                      /* 186 = setacl */
                    348:        3, notimp,                      /* 187 = fsetacl */
                    349:        3, notimp,                      /* 188 = getacl */
                    350:        3, notimp,                      /* 189 = fgetacl */
                    351:        6, hpuxgetaccess,               /* 190 = getaccess */
                    352:        0, notimp,                      /* 191 = getaudid */
                    353:        1, notimp,                      /* 192 = setaudid */
                    354:        0, notimp,                      /* 193 = getaudproc */
                    355:        1, notimp,                      /* 194 = setaudproc */
                    356:        2, notimp,                      /* 195 = getevent */
                    357:        2, notimp,                      /* 196 = setevent */
                    358:        1, notimp,                      /* 197 = audwrite */
                    359:        1, notimp,                      /* 198 = audswitch */
                    360:        4, notimp,                      /* 199 = audctl */
                    361:        3, hpuxwaitpid,                 /* 200 = waitpid */
                    362:        0, nosys,                       /* 201 = nosys */
                    363:        2, notimp,                      /* 202 = netioctl */
                    364:        6, nosys,                       /* 203 = nosys */
                    365:        0, nosys,                       /* 204 = nosys */
                    366:        0, nosys,                       /* 205 = nosys */
                    367:        9, nosys,                       /* 206 = nosys */
                    368:        0, nosys,                       /* 207 = nosys */
                    369:        0, nosys,                       /* 208 = nosys */
                    370:        6, nosys,                       /* 209 = nosys */
                    371:        5, nosys,                       /* 210 = nosys */
                    372:        0, nosys,                       /* 211 = nosys */
                    373:        0, nosys,                       /* 212 = nosys */
                    374:        0, nosys,                       /* 213 = nosys */
                    375:        0, nosys,                       /* 214 = nosys */
                    376:        0, nosys,                       /* 215 = nosys */
                    377:        0, nosys,                       /* 216 = nosys */
                    378:        0, nosys,                       /* 217 = nosys */
                    379:        0, nosys,                       /* 218 = nosys */
                    380:        0, nosys,                       /* 219 = nosys */
                    381:        4, nosys,                       /* 220 = nosys */
                    382:        10, nosys,                      /* 221 = nosys */
                    383:        0, nosys,                       /* 222 = nosys */
                    384:        0, nosys,                       /* 223 = nosys */
                    385:        0, nosys,                       /* 224 = nosys */
                    386:        2, notimp,                      /* 225 = pathconf */
                    387:        2, notimp,                      /* 226 = fpathconf */
                    388:        0, nosys,                       /* 227 = nosys */
                    389:        0, nosys,                       /* 228 = nosys */
                    390:        0, notimp,                      /* 229 = async_daemon */
                    391:        3, notimp,                      /* 230 = nfs_fcntl */
                    392:        4, getdirentries,               /* 231 = getdirentries */
                    393:        2, hpuxgetdomainname,           /* 232 = getdomainname */
                    394:        2, notimp,                      /* 233 = nfs_getfh */
                    395:        4, notimp,                      /* 234 = vfsmount */
                    396:        1, notimp,                      /* 235 = nfs_svc */
                    397:        2, hpuxsetdomainname,           /* 236 = setdomainname */
                    398:        0, notimp,                      /* 237 = statfs */
                    399:        0, notimp,                      /* 238 = fstatfs */
                    400:        3, hpuxsigaction,               /* 239 = sigaction */
                    401:        3, hpuxsigprocmask,             /* 240 = sigprocmask */
                    402:        1, hpuxsigpending,              /* 241 = sigpending */
                    403:        1, hpuxsigsuspend,              /* 242 = sigsuspend */
                    404: };
                    405: int    hpuxnsysent = sizeof (hpuxsysent) / sizeof (hpuxsysent[0]);
                    406: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.