Annotation of 43BSDReno/sys/hpux/hpux_sysent.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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