# 2.11BSD#431 - /usr/src/sys/h/systm.h

##### Variables

    boothowto         X
    clstaddr          X
    curpri            X
    dumpdev           X
    dumplo            X
    maxmem            X
    mpid              X
    nblkdev           X
    nchrdev           X
    noproc            X
    nswap             X
    panicstr          X
    pipedev           X
    rablock           X
    rootdev           X
    runin             X
    runout            X
    runrun            X
    selwait           X
    swapdev           X
    updlock           X

##### Macros

    insque            X
    remque            X

##### struct's

    sysent            X

       1: /*
       2:  * Copyright (c) 1986 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)systm.h	1.3 (2.11BSD GTE) 1996/5/9
       7:  */
       8:
       9: #ifndef SUPERVISOR
      10:
      11: /*
      12:  * The `securelevel' variable controls the security level of the system.
      13:  * It can only be decreased by process 1 (/sbin/init).
      14:  *
      15:  * Security levels are as follows:
      16:  *   -1	permannently insecure mode - always run system in level 0 mode.
      17:  *    0	insecure mode - immutable and append-only flags make be turned off.
      18:  *	All devices may be read or written subject to permission modes.
      19:  *    1	secure mode - immutable and append-only flags may not be changed;
      20:  *	raw disks of mounted filesystems, /dev/mem, and /dev/kmem are
      21:  *	read-only.
      22:  *    2	highly secure mode - same as (1) plus raw disks are always
      23:  *	read-only whether mounted or not. This level precludes tampering
      24:  *	with filesystems by unmounting them, but also inhibits running
      25:  *	newfs while the system is secured.
      26:  *
      27:  * In normal operation, the system runs in level 0 mode while single user
      28:  * and in level 1 mode while multiuser. If level 2 mode is desired while
      29:  * running multiuser, it can be set in the multiuser startup script
      30:  * (/etc/rc.local) using sysctl(8). If it is desired to run the system
      31:  * in level 0 mode while multiuser, initialize the variable securelevel
      32:  * in /sys/kern/kern_sysctl.c to -1. Note that it is NOT initialized to
      33:  * zero as that would allow the vmunix binary to be patched to -1.
      34:  * Without initialization, securelevel loads in the BSS area which only
      35:  * comes into existence when the kernel is loaded and hence cannot be
      36:  * patched by a stalking hacker.
      37:  */
      38: extern int securelevel;     /* system security level */
      39:
      40: extern  char version[];     /* system version */
      41:
      42: /*
      43:  * Nblkdev is the number of entries (rows) in the block switch.
      44:  * Used in bounds checking on major device numbers.
      45:  */
      46: int nblkdev;
      47:
      48: /*
      49:  * Number of character switch entries.
      50:  */
      51: int nchrdev;
      52:
      53: int mpid;           /* generic for unique process id's */
      54: char    runin;          /* scheduling flag */
      55: char    runout;         /* scheduling flag */
      56: int runrun;         /* scheduling flag */
      57: char    curpri;         /* more scheduling */
      58:
      59: u_int   maxmem;         /* actual max memory per process */
      60:
      61: u_int   nswap;          /* size of swap space */
      62: int updlock;        /* lock for sync */
      63: daddr_t rablock;        /* block to be read ahead */
      64: dev_t   rootdev;        /* device of the root */
      65: dev_t   dumpdev;        /* device to take dumps on */
      66: long    dumplo;         /* offset into dumpdev */
      67: dev_t   swapdev;        /* swapping device */
      68: dev_t   pipedev;        /* pipe device */
      69: int nodev();        /* no device function used in bdevsw/cdevsw */
      70:
      71: extern  int icode[];        /* user init code */
      72: extern  int szicode;        /* its size */
      73:
      74: daddr_t bmap();
      75:
      76: ubadr_t clstaddr;       /* UNIBUS virtual address of clists */
      77:
      78: extern int  cputype;    /* type of cpu = 40, 44, 45, 60, or 70 */
      79:
      80: /*
      81:  * Structure of the system-entry table
      82:  */
      83: extern struct sysent
      84: {
      85:     char    sy_narg;        /* total number of arguments */
      86:     int (*sy_call)();       /* handler */
      87: } sysent[];
      88:
      89: int noproc;         /* no one is running just now */
      90: char    *panicstr;
      91: int boothowto;      /* reboot flags, from boot */
      92: int selwait;
      93:
      94: /* casts to keep lint happy */
      95: #ifdef lint
      96: #define insque(q,p) _insque((caddr_t)q,(caddr_t)p)
      97: #define remque(q)   _remque((caddr_t)q)
      98: #endif
      99:
     100: extern  bool_t  sep_id;     /* separate I/D */
     101: extern  char    regloc[];   /* offsets of saved user registers (trap.c) */
     102: #endif

#### Defined variables

boothowto defined in line 91; used 2 times

- in /usr/src/sys/sys/init_main.c line 121, 191

clstaddr defined in line 76; used 8 times

- in /usr/src/sys/pdp/machdep2.c line 67, 143-146(2), 330-331(2)
- in /usr/src/sys/pdpuba/dh.c line 71
- in /usr/src/sys/pdpuba/dhu.c line 77
- in /usr/src/sys/pdpuba/dhv.c line 98

curpri defined in line 57; used 5 times

- in /usr/src/sys/pdp/trap.c line 303, 378
- in /usr/src/sys/sys/kern_synch.c line 370, 395, 484

dumpdev defined in line 65; used 6 times

- in /usr/src/sys/pdp/machdep2.c line 444-446(3)
- in /usr/src/sys/sys/init_main.c line 131-132(3)

dumplo defined in line 66; used 21 times

- in /usr/src/sys/pdp/machdep2.c line 445
- in /usr/src/sys/pdpuba/br.c line 390-397(4)
- in /usr/src/sys/pdpuba/hk.c line 715-719(3)
- in /usr/src/sys/pdpuba/ra.c line 1318-1326(3)
- in /usr/src/sys/pdpuba/rl.c line 635-642(3)
- in /usr/src/sys/pdpuba/si.c line 426-428(3), 437
- in /usr/src/sys/pdpuba/xp.c line 978-985(3)

maxmem defined in line 59; used 3 times

- in /usr/src/sys/pdp/machdep2.c line 114
- in /usr/src/sys/sys/init_main.c line 232
- in /usr/src/sys/sys/kern_mman.c line 106

mpid defined in line 53; used 11 times

- in /usr/src/sys/sys/kern_fork.c line 116-122(4), 134-141(6), 171

nblkdev defined in line 46; used 3 times

- in /usr/src/sys/sys/sys_inode.c line 676
- in /usr/src/sys/sys/ufs_bio.c line 246
- in /usr/src/sys/sys/ufs_mount.c line 346

nchrdev defined in line 51; used 1 times

- in /usr/src/sys/sys/sys_inode.c line 648

noproc defined in line 89; used 5 times

- in /usr/src/sys/sys/kern_clock.c line 89, 101, 190
- in /usr/src/sys/sys/kern_exit.c line 112
- in /usr/src/sys/sys/kern_synch.c line 451

nswap defined in line 61; used 2 times

- in /usr/src/sys/sys/init_main.c line 188-189(2)

panicstr defined in line 90; used 3 times

- in /usr/src/sys/sys/kern_synch.c line 121
- in /usr/src/sys/sys/subr_prf.c line 280-283(2)

pipedev defined in line 68; used 3 times

- in /usr/src/sys/sys/init_main.c line 125
- in /usr/src/sys/sys/sys_pipe.c line 45, 51

rablock defined in line 63; used 5 times

- in /usr/src/sys/sys/sys_inode.c line 244, 251
- in /usr/src/sys/sys/ufs_bmap.c line 47, 72, 159

rootdev defined in line 64; used 9 times

- in /usr/src/sys/pdp/machdep2.c line 388
- in /usr/src/sys/sys/init_main.c line 123-125(3), 191, 206-208(2)
- in /usr/src/sys/sys/kern_xxx.c line 24
- in /usr/src/sys/sys/subr_prf.c line 286

runin defined in line 54; used 8 times

- in /usr/src/sys/sys/kern_synch.c line 67-69(3)
- in /usr/src/sys/sys/subr_rmap.c line 118-120(3)
- in /usr/src/sys/sys/vm_sched.c line 152-153(2)

runout defined in line 55; used 11 times

- in /usr/src/sys/sys/kern_synch.c line 321-323(3), 373-375(3)
- in /usr/src/sys/sys/vm_sched.c line 66-67(2)
- in /usr/src/sys/sys/vm_swap.c line 155-157(3)

runrun defined in line 56; used 7 times

- in /usr/src/sys/pdp/trap.c line 304, 379
- in /usr/src/sys/sys/kern_synch.c line 71, 319, 371, 396, 452

selwait defined in line 92; used 12 times

- in /usr/src/sys/sys/sys_generic.c line 426, 513-517(2)
- in /usr/src/sys/sys/sys_pipe.c line 229, 241, 252
- in /usr/src/sys/sys/tty.c line 619, 628
- in /usr/src/sys/sys/tty_pty.c line 351, 371
- in /usr/src/sys/sys/uipc_socket2.c line 232-234(2)

swapdev defined in line 67; used 18 times

- in /usr/src/sys/sys/init_main.c line 124, 132, 150, 168-169(4), 180-181(2)
- in /usr/src/sys/sys/kern_exec.c line 246, 286-287(2), 324
- in /usr/src/sys/sys/kern_sysctl.c line 998-1003(2)
- in /usr/src/sys/sys/ufs_subr.c line 167
- in /usr/src/sys/sys/vm_swp.c line 47, 56

updlock defined in line 62; used 3 times

- in /usr/src/sys/sys/ufs_subr.c line 32-34(2), 47

#### Defined struct's

sysent defined in line 83; used 4 times

- in /usr/src/sys/pdp/trap.c line 328(2)
- in /usr/src/sys/sys/init_sysent.c line 109(2)

#### Defined macros

insque defined in line 96; used 10 times

- in /usr/src/sys/net/raw_cb.c line 62
- in /usr/src/sys/netinet/in_pcb.c line 47
- in /usr/src/sys/netinet/ip_input.c line 331
- in /usr/src/sys/netinet/tcp_input.c line 142
- in /usr/src/sys/netns/ns_pcb.c line 44
- in /usr/src/sys/netns/spp_usrreq.c line 474
- in /usr/src/sys/sys/quota_kern.c line 245, 536
- in /usr/src/sys/sys/ufs_inode.c line 184
- in /usr/src/sys/sys/ufs_namei.c line 758

remque defined in line 97; used 20 times

- in /usr/src/sys/net/raw_cb.c line 84
- in /usr/src/sys/netinet/in_pcb.c line 235
- in /usr/src/sys/netinet/ip_input.c line 422, 449
- in /usr/src/sys/netinet/tcp_input.c line 135, 159
- in /usr/src/sys/netinet/tcp_subr.c line 237
- in /usr/src/sys/netns/ns_pcb.c line 197
- in /usr/src/sys/netns/spp_usrreq.c line 502, 1479
- in /usr/src/sys/sys/quota_kern.c line 244, 427, 535, 799
- in /usr/src/sys/sys/ufs_inode.c line 183, 209, 750
- in /usr/src/sys/sys/ufs_namei.c line 345, 741, 1263

#### Usage of this include

systm.h used 111 times

- in /usr/src/new/kermit5.188/ckcnet.h line 96
- in /usr/src/sys/CURLY/ioconf.c line 10
- in /usr/src/sys/CURLY/param.c line 10
- in /usr/src/sys/GENERIC/ioconf.c line 10
- in /usr/src/sys/GENERIC/param.c line 10
- in /usr/src/sys/QT/ioconf.c line 10
- in /usr/src/sys/QT/param.c line 10
- in /usr/src/sys/conf/ioconf.c line 10
- in /usr/src/sys/conf/param.c line 10
- in /usr/src/sys/net/if.c line 17
- in /usr/src/sys/net/if_loop.c line 20
- in /usr/src/sys/net/raw_cb.c line 16
- in /usr/src/sys/net/route.c line 16
- in /usr/src/sys/netimp/if_imp.c line 18
- in /usr/src/sys/netinet/if_ether.c line 27
- in /usr/src/sys/netinet/in_pcb.c line 16
- in /usr/src/sys/netinet/ip_icmp.c line 16
- in /usr/src/sys/netinet/ip_input.c line 16
- in /usr/src/sys/netinet/tcp_debug.c line 23
- in /usr/src/sys/netinet/tcp_input.c line 16
- in /usr/src/sys/netinet/tcp_output.c line 16
- in /usr/src/sys/netinet/tcp_subr.c line 16
- in /usr/src/sys/netinet/tcp_timer.c line 16
- in /usr/src/sys/netinet/tcp_usrreq.c line 16
- in /usr/src/sys/netns/ns_error.c line 17
- in /usr/src/sys/netns/ns_input.c line 17
- in /usr/src/sys/netns/ns_ip.c line 21
- in /usr/src/sys/netns/ns_pcb.c line 17
- in /usr/src/sys/netns/spp_debug.c line 17
- in /usr/src/sys/netns/spp_usrreq.c line 17
- in /usr/src/sys/pdp/cons.c line 18
- in /usr/src/sys/pdp/kern_pdp.c line 17
- in /usr/src/sys/pdp/machdep2.c line 26
- in /usr/src/sys/pdp/ram.c line 25
- in /usr/src/sys/pdp/trap.c line 17
- in /usr/src/sys/pdpif/if_acc.c line 20
- in /usr/src/sys/pdpif/if_css.c line 40
- in /usr/src/sys/pdpif/if_de.c line 21
- in /usr/src/sys/pdpif/if_dmc.c line 22
- in /usr/src/sys/pdpif/if_en.c line 17
- in /usr/src/sys/pdpif/if_il.c line 32
- in /usr/src/sys/pdpif/if_qe.c line 113
- in /usr/src/sys/pdpif/if_qt.c line 60
- in /usr/src/sys/pdpif/if_sri.c line 17
- in /usr/src/sys/pdpif/if_uba.c line 17
- in /usr/src/sys/pdpif/if_vv.c line 47
- in /usr/src/sys/pdpuba/br.c line 42
- in /usr/src/sys/pdpuba/dh.c line 30
- in /usr/src/sys/pdpuba/dhu.c line 36
- in /usr/src/sys/pdpuba/dhv.c line 43
- in /usr/src/sys/pdpuba/dz.c line 30
- in /usr/src/sys/pdpuba/hk.c line 36
- in /usr/src/sys/pdpuba/ht.c line 23
- in /usr/src/sys/pdpuba/lp.c line 18
- in /usr/src/sys/pdpuba/ra.c line 135
- in /usr/src/sys/pdpuba/rk.c line 17
- in /usr/src/sys/pdpuba/rl.c line 48
- in /usr/src/sys/pdpuba/si.c line 18
- in /usr/src/sys/pdpuba/tm.c line 24
- in /usr/src/sys/pdpuba/tmscp.c line 251
- in /usr/src/sys/pdpuba/xp.c line 20
- in /usr/src/sys/sys/init_main.c line 26
- in /usr/src/sys/sys/init_sysent.c line 14
- in /usr/src/sys/sys/kern_acct.c line 16
- in /usr/src/sys/sys/kern_clock.c line 18
- in /usr/src/sys/sys/kern_descrip.c line 13
- in /usr/src/sys/sys/kern_exec.c line 13
- in /usr/src/sys/sys/kern_exit.c line 13
- in /usr/src/sys/sys/kern_fork.c line 13
- in /usr/src/sys/sys/kern_mman.c line 16
- in /usr/src/sys/sys/kern_proc.c line 12
- in /usr/src/sys/sys/kern_prot.c line 16
- in /usr/src/sys/sys/kern_prot2.c line 45
- in /usr/src/sys/sys/kern_resource.c line 12
- in /usr/src/sys/sys/kern_sig.c line 11
- in /usr/src/sys/sys/kern_sig2.c line 58
- in /usr/src/sys/sys/kern_subr.c line 12
- in /usr/src/sys/sys/kern_synch.c line 19
- in /usr/src/sys/sys/kern_sysctl.c line 45
- in /usr/src/sys/sys/kern_time.c line 13
- in /usr/src/sys/sys/kern_xxx.c line 14
- in /usr/src/sys/sys/quota_kern.c line 27
- in /usr/src/sys/sys/quota_subr.c line 16
- in /usr/src/sys/sys/quota_sys.c line 15
- in /usr/src/sys/sys/quota_ufs.c line 16
- in /usr/src/sys/sys/subr_prf.c line 18
- in /usr/src/sys/sys/subr_rmap.c line 10
- in /usr/src/sys/sys/sys_generic.c line 22
- in /usr/src/sys/sys/sys_inode.c line 26
- in /usr/src/sys/sys/sys_pipe.c line 10
- in /usr/src/sys/sys/sys_process.c line 14
- in /usr/src/sys/sys/sys_socket.c line 17
- in /usr/src/sys/sys/tty.c line 19
- in /usr/src/sys/sys/tty_pty.c line 17
- in /usr/src/sys/sys/tty_tb.c line 17
- in /usr/src/sys/sys/ufs_bio.c line 15
- in /usr/src/sys/sys/ufs_bmap.c line 12
- in /usr/src/sys/sys/ufs_disksubr.c line 45
- in /usr/src/sys/sys/ufs_dsort.c line 14
- in /usr/src/sys/sys/ufs_fio.c line 15
- in /usr/src/sys/sys/ufs_inode.c line 20
- in /usr/src/sys/sys/ufs_mount.c line 12
- in /usr/src/sys/sys/ufs_namei.c line 11
- in /usr/src/sys/sys/ufs_subr.c line 19
- in /usr/src/sys/sys/ufs_syscalls.c line 10
- in /usr/src/sys/sys/uipc_socket2.c line 16
- in /usr/src/sys/sys/uipc_syscalls.c line 14
- in /usr/src/sys/sys/vm_sched.c line 15
- in /usr/src/sys/sys/vm_swap.c line 17
- in /usr/src/sys/sys/vm_swp.c line 16
- in /usr/src/sys/sys/vm_text.c line 19

Last modified: 1996-05-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 948 |