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

##### Macros

    PRIO_MAX          X
    PRIO_MIN          X
    PRIO_PGRP         X
    PRIO_PROCESS      X
    PRIO_USER         X
    RLIMIT_CORE       X
    RLIMIT_CPU        X
    RLIMIT_DATA       X
    RLIMIT_FSIZE      X
    RLIMIT_RSS        X
    RLIMIT_STACK      X
    RLIM_INFINITY     X
    RLIM_NLIMITS      X
    RUSAGE_CHILDREN   X
    RUSAGE_SELF       X
    _SYS_RESOURCE_H_  X
    k_ru_first        X
    k_ru_last         X
    ru_first          X
    ru_last           X

##### struct's

    k_rusage          X
    loadavg           X
    rlimit            X
    rusage            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:  *	@(#)resource.h	1.3 (2.11BSD GTE) 1997/2/14
       7:  */
       8:
       9: #ifndef _SYS_RESOURCE_H_
      10: #define _SYS_RESOURCE_H_
      11:
      12: /*
      13:  * Process priority specifications to get/setpriority.
      14:  */
      15: #define PRIO_MIN    -20
      16: #define PRIO_MAX    20
      17:
      18: #define PRIO_PROCESS    0
      19: #define PRIO_PGRP   1
      20: #define PRIO_USER   2
      21:
      22: /*
      23:  * Resource utilization information.
      24:  */
      25:
      26: #define RUSAGE_SELF 0
      27: #define RUSAGE_CHILDREN -1
      28:
      29: struct  rusage {
      30:     struct timeval ru_utime;    /* user time used */
      31:     struct timeval ru_stime;    /* system time used */
      32:     long    ru_maxrss;
      33: #define ru_first    ru_ixrss
      34:     long    ru_ixrss;       /* integral shared memory size */
      35:     long    ru_idrss;       /* integral unshared data " */
      36:     long    ru_isrss;       /* integral unshared stack " */
      37:     long    ru_minflt;      /* page reclaims */
      38:     long    ru_majflt;      /* page faults */
      39:     long    ru_ovly;        /* overlay changes */
      40:     long    ru_nswap;       /* swaps */
      41:     long    ru_inblock;     /* block input operations */
      42:     long    ru_oublock;     /* block output operations */
      43:     long    ru_msgsnd;      /* messages sent */
      44:     long    ru_msgrcv;      /* messages received */
      45:     long    ru_nsignals;        /* signals received */
      46:     long    ru_nvcsw;       /* voluntary context switches */
      47:     long    ru_nivcsw;      /* involuntary " */
      48: #define ru_last     ru_nivcsw
      49: };
      50:
      51: struct  k_rusage {          /* KERNEL RUSAGE STRUCTURE */
      52: #define k_ru_first  ru_utime
      53:     long    ru_utime;       /* user time used ('hz' ticks) */
      54:     long    ru_stime;       /* system time used ('hz' ticks) */
      55:     long    ru_ovly;        /* overlay changes */
      56:     long    ru_nswap;       /* swaps */
      57:     long    ru_inblock;     /* block input operations */
      58:     long    ru_oublock;     /* block output operations */
      59:     long    ru_msgsnd;      /* messages sent */
      60:     long    ru_msgrcv;      /* messages received */
      61:     long    ru_nsignals;        /* signals received */
      62:     long    ru_nvcsw;       /* voluntary context switches */
      63:     long    ru_nivcsw;      /* involuntary " */
      64: #define k_ru_last       ru_nivcsw
      65: };
      66:
      67: /*
      68:  * Resource limits
      69:  */
      70: #define RLIMIT_CPU  0       /* cpu time in milliseconds */
      71: #define RLIMIT_FSIZE    1       /* maximum file size */
      72: #define RLIMIT_DATA 2       /* data size */
      73: #define RLIMIT_STACK    3       /* stack size */
      74: #define RLIMIT_CORE 4       /* core file size */
      75: #define RLIMIT_RSS  5       /* resident set size */
      76:
      77: #define RLIM_NLIMITS    6       /* number of resource limits */
      78:
      79: #define RLIM_INFINITY   0x7fffffff
      80:
      81: struct rlimit {
      82:     long    rlim_cur;       /* current (soft) limit */
      83:     long    rlim_max;       /* maximum value for rlim_cur */
      84: };
      85:
      86: /* Load average structure. */
      87: struct loadavg {
      88:     short ldavg[3];
      89:     int fscale;
      90: };
      91: #endif	/* !_SYS_RESOURCE_H_ */

#### Defined struct's

k_rusage defined in line 51; used 12 times

- in /usr/src/sys/h/user.h line 118-119(4)
- in /usr/src/sys/pdp/genassym.c line 68(2)
- in /usr/src/sys/sys/kern_resource.c line 215(2), 238(2), 257(2)

loadavg defined in line 87; used 4 times

- in /usr/src/lib/libc/gen/getloadavg.c line 53(2)
- in /usr/src/sys/sys/kern_sysctl.c line 431(2)

rlimit defined in line 81; used 40 times

- in /usr/src/bin/chpass/chpass.c line 77(2)
- in /usr/src/bin/csh/sh.func.c line 1018(2), 1065(2)
- in /usr/src/bin/passwd/passwd.c line 47(2)
- in /usr/src/bin/tcsh/sh.func.c line 1492(2), 1561(2)
- in /usr/src/new/OLD/apl/src/am.c line 26(2), 61(2)
- in /usr/src/new/PORT/apl/src/am.c line 26(2), 61(2)
- in /usr/src/sys/h/user.h line 133(2)
- in /usr/src/sys/sys/kern_resource.c line 148-151(6), 160(2), 187(2), 195(2), 203-206(4)
- in /usr/src/usr.sbin/vipw/vipw.c line 43(2)

rusage defined in line 29; used 76 times

- in /usr/src/bin/csh/sh.h line 67(2)
- in /usr/src/bin/csh/sh.proc.c line 38(2), 634(2), 662-663(4)
- in /usr/src/bin/csh/sh.time.c line 19(2), 34(2), 61(2), 78(2)
- in /usr/src/bin/tcsh/sh.h line 342(2)
- in /usr/src/bin/tcsh/sh.proc.c line 113(2), 123-125(4), 176(2), 1126-1127(4)
- in /usr/src/bin/tcsh/sh.time.c line 75(2), 106(2), 165(2), 253(2)
- in /usr/src/bin/time.c line 21(2)
- in /usr/src/lib/libc/compat-4.1/times.c line 19(2)
- in /usr/src/lib/libc/gen/wait.c line 47(2)
- in /usr/src/lib/libc/gen/wait3.c line 47(2)
- in /usr/src/lib/libc/gen/waitpid.c line 49(2)
- in /usr/src/new/nntp/server/serve.c line 88(2)
- in /usr/src/new/nntp/xmit/nntpxmit.c line 290(2)
- in /usr/src/sys/sys/kern_exit.c line 163(2), 190(2)
- in /usr/src/sys/sys/kern_resource.c line 213-216(4), 234(2), 256(2)
- in /usr/src/ucb/PORT/pascal/px/utilities.c line 20(2)
- in /usr/src/ucb/window/lcmd2.c line 63(2)
- in /usr/src/usr.sbin/inetd/inetd.c line 472(2)
- in /usr/src/usr.sbin/named/named/ns_main.c line 944(2)
- in /usr/src/usr.sbin/syslogd/syslogd.c line 716(2)

#### Defined macros

PRIO_MAX defined in line 16; used 6 times

- in /usr/src/sys/sys/kern_resource.c line 27, 65, 133-134(2)
- in /usr/src/usr.bin/renice/renice.c line 40-41(2)

PRIO_MIN defined in line 15; used 5 times

- in /usr/src/sbin/shutdown/shutdown.c line 178
- in /usr/src/sys/sys/kern_resource.c line 135-136(2)
- in /usr/src/usr.bin/renice/renice.c line 42-43(2)

PRIO_PGRP defined in line 19; used 1 times

- in /usr/src/usr.bin/renice/renice.c line 46

PRIO_PROCESS defined in line 18; used 23 times

- in /usr/src/bin/chpass/chpass.c line 213
- in /usr/src/bin/csh/sh.proc.c line 1085
- in /usr/src/bin/csh/sh.sem.c line 207
- in /usr/src/bin/csh/sh.time.c line 57
- in /usr/src/bin/login/login.c line 109, 249-252(2)
- in /usr/src/bin/nice.c line 36-37(2)
- in /usr/src/bin/passwd/passwd.c line 143
- in /usr/src/bin/su.c line 89, 132
- in /usr/src/bin/tcsh/sh.proc.c line 1732
- in /usr/src/bin/tcsh/sh.sem.c line 459
- in /usr/src/bin/tcsh/sh.time.c line 156
- in /usr/src/lib/libc/compat-4.1/nice.c line 24-27(2)
- in /usr/src/libexec/acctd/acctd.c line 155
- in /usr/src/sbin/shutdown/shutdown.c line 178
- in /usr/src/usr.bin/renice/renice.c line 29, 54
- in /usr/src/usr.sbin/ntp/ntpd.c line 298
- in /usr/src/usr.sbin/vipw/vipw.c line 132

PRIO_USER defined in line 20; used 2 times

- in /usr/src/usr.bin/renice/renice.c line 50, 57

RLIMIT_CORE defined in line 74; used 12 times

- in /usr/src/bin/csh/sh.func.c line 882
- in /usr/src/bin/tcsh/sh.func.c line 1268-1269(2)
- in /usr/src/new/OLD/apl/src/am.c line 28-30(2), 63-65(2)
- in /usr/src/new/PORT/apl/src/am.c line 28-30(2), 63-65(2)
- in /usr/src/sys/sys/kern_sig.c line 633

RLIMIT_CPU defined in line 70; used 32 times

- in /usr/src/bin/chpass/chpass.c line 135
- in /usr/src/bin/csh/sh.func.c line 878, 954-959(2), 966, 972, 980, 986, 1026
- in /usr/src/bin/passwd/passwd.c line 83
- in /usr/src/bin/tcsh/sh.func.c line 1252-1253(2), 1408-1410(2), 1419, 1425, 1435, 1441-1442(2), 1450-1451(2), 1461, 1508-1509(2)
- in /usr/src/bin/tcsh/sh.print.c line 58
- in /usr/src/sys/sys/kern_clock.c line 106-110(4)
- in /usr/src/sys/sys/kern_resource.c line 163, 194
- in /usr/src/usr.sbin/vipw/vipw.c line 55

RLIMIT_DATA defined in line 72; used 3 times

- in /usr/src/bin/csh/sh.func.c line 880
- in /usr/src/bin/tcsh/sh.func.c line 1260-1261(2)

RLIMIT_FSIZE defined in line 71; used 10 times

- in /usr/src/bin/chpass/chpass.c line 136
- in /usr/src/bin/csh/sh.func.c line 879
- in /usr/src/bin/passwd/passwd.c line 84
- in /usr/src/bin/tcsh/sh.func.c line 1256-1257(2), 1514, 1574
- in /usr/src/sys/sys/kern_exit.c line 76
- in /usr/src/sys/sys/sys_inode.c line 190
- in /usr/src/usr.sbin/vipw/vipw.c line 56

RLIMIT_RSS defined in line 75; used 3 times

- in /usr/src/bin/csh/sh.func.c line 883
- in /usr/src/bin/tcsh/sh.func.c line 1272-1273(2)

RLIMIT_STACK defined in line 73; used 3 times

- in /usr/src/bin/csh/sh.func.c line 881
- in /usr/src/bin/tcsh/sh.func.c line 1264-1265(2)

RLIM_INFINITY defined in line 79; used 27 times

- in /usr/src/bin/chpass/chpass.c line 134
- in /usr/src/bin/csh/sh.func.c line 994, 1024, 1047, 1055, 1070, 1076
- in /usr/src/bin/passwd/passwd.c line 82
- in /usr/src/bin/tcsh/sh.func.c line 1227, 1459, 1506, 1541, 1549, 1567, 1574-1579(2)
- in /usr/src/sys/sys/init_main.c line 86
- in /usr/src/sys/sys/kern_exit.c line 76
- in /usr/src/sys/sys/kern_resource.c line 168-173(4), 198-200(2)
- in /usr/src/usr.sbin/pstat/pstat.c line 659, 668
- in /usr/src/usr.sbin/vipw/vipw.c line 54

RLIM_NLIMITS defined in line 77; used 5 times

- in /usr/src/sys/h/user.h line 133
- in /usr/src/sys/sys/kern_resource.c line 154, 190
- in /usr/src/usr.sbin/pstat/pstat.c line 657, 666

RUSAGE_CHILDREN defined in line 27; used 9 times

- in /usr/src/bin/csh/sh.time.c line 23, 37
- in /usr/src/bin/tcsh/sh.proc.c line 138
- in /usr/src/bin/tcsh/sh.time.c line 79, 109
- in /usr/src/lib/libc/compat-4.1/times.c line 26
- in /usr/src/new/nntp/server/serve.c line 262
- in /usr/src/new/nntp/xmit/nntpxmit.c line 295
- in /usr/src/ucb/window/lcmd2.c line 80

RUSAGE_SELF defined in line 26; used 10 times

- in /usr/src/bin/csh/sh.time.c line 22, 36
- in /usr/src/bin/tcsh/sh.time.c line 52, 78, 108
- in /usr/src/lib/libc/compat-4.1/times.c line 22
- in /usr/src/new/nntp/server/serve.c line 261
- in /usr/src/new/nntp/xmit/nntpxmit.c line 294
- in /usr/src/ucb/PORT/pascal/px/utilities.c line 38
- in /usr/src/ucb/window/lcmd2.c line 80

_SYS_RESOURCE_H_ defined in line 10; used 1 times

- in line 9

k_ru_first defined in line 52; used 3 times

- in /usr/src/sys/sys/kern_resource.c line 247-248(3)

k_ru_last defined in line 64; used 1 times

- in /usr/src/sys/sys/kern_resource.c line 248

ru_first defined in line 33; used 3 times

- in /usr/src/bin/csh/sh.time.c line 70-71(3)

ru_last defined in line 48; used 1 times

- in /usr/src/bin/csh/sh.time.c line 70

#### Usage of this include

resource.h used 43 times

- in /usr/src/bin/chpass/chpass.c line 31
- in /usr/src/bin/csh/sh.h line 10
- in /usr/src/bin/login/login.c line 36
- in /usr/src/bin/nice.c line 20
- in /usr/src/bin/passwd/passwd.c line 32
- in /usr/src/bin/su.c line 23
- in /usr/src/bin/tcsh/sh.h line 121
- in /usr/src/bin/tcsh/tc.os.h line 42, 90
- in /usr/src/bin/time.c line 12
- in /usr/src/lib/libc/compat-4.1/nice.c line 12
- in /usr/src/lib/libc/compat-4.1/times.c line 12
- in /usr/src/lib/libc/gen/wait.c line 41
- in /usr/src/lib/libc/gen/wait3.c line 41
- in /usr/src/lib/libc/gen/waitpid.c line 41
- in /usr/src/libexec/acctd/acctd.c line 23
- in /usr/src/new/OLD/apl/src/am.c line 5
- in /usr/src/new/PORT/apl/src/am.c line 5
- in /usr/src/new/nntp/server/serve.c line 19
- in /usr/src/new/nntp/xfer/nntpxfer.c line 31
- in /usr/src/new/nntp/xmit/nntpxmit.c line 69
- in /usr/src/sbin/shutdown/shutdown.c line 26
- in /usr/src/sys/CURLY/param.c line 13
- in /usr/src/sys/GENERIC/param.c line 13
- in /usr/src/sys/QT/param.c line 13
- in /usr/src/sys/conf/param.c line 13
- in /usr/src/sys/h/sysctl.h line 47
- in /usr/src/sys/h/user.h line 14, 20
- in /usr/src/sys/pdp/conf.c line 14
- in /usr/src/sys/sys/kern_sig2.c line 56
- in /usr/src/ucb/PORT/pascal/px/utilities.c line 16
- in /usr/src/ucb/window/lcmd2.c line 16
- in /usr/src/usr.bin/renice/renice.c line 16
- in /usr/src/usr.sbin/inetd/inetd.c line 97
- in /usr/src/usr.sbin/named/named/ns_main.c line 34
- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 72
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 123
- in /usr/src/usr.sbin/ntp/ntpd.c line 102
- in /usr/src/usr.sbin/sendmail.MX/src/daemon.c line 24
- in /usr/src/usr.sbin/sendmail/src/daemon.c line 24
- in /usr/src/usr.sbin/syslogd/syslogd.c line 63
- in /usr/src/usr.sbin/vipw/vipw.c line 31

Last modified: 1997-02-15 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 849 |