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
loadavg defined in line 87; used 4 times

Defined macros

PRIO_MAX defined in line 16; used 6 times
PRIO_PGRP defined in line 19; used 1 times
PRIO_USER defined in line 20; used 2 times
RLIMIT_DATA defined in line 72; used 3 times
RLIMIT_RSS defined in line 75; used 3 times
RLIMIT_STACK defined in line 73; used 3 times
_SYS_RESOURCE_H_ defined in line 10; used 1 times
  • in line 9
k_ru_first defined in line 52; used 3 times
k_ru_last defined in line 64; used 1 times
ru_first defined in line 33; used 3 times
ru_last defined in line 48; used 1 times

Usage of this include

resource.h used 43 times
Last modified: 1997-02-15
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3766
Valid CSS Valid XHTML 1.0 Strict