home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 25.ddi / root.2 / usr / ucbinclude / sys / resource.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.8 KB  |  104 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10.  
  11. #ident    "@(#)//usr/ucbinclude/sys/resource.h.sl 1.1 4.0 12/08/90 54327 AT&T-USL"
  12.  
  13. /*******************************************************************
  14.  
  15.         PROPRIETARY NOTICE (Combined)
  16.  
  17. This source code is unpublished proprietary information
  18. constituting, or derived under license from AT&T's UNIX(r) System V.
  19. In addition, portions of such source code were derived from Berkeley
  20. 4.3 BSD under license from the Regents of the University of
  21. California.
  22.  
  23.  
  24.  
  25.         Copyright Notice 
  26.  
  27. Notice of copyright on this source code product does not indicate 
  28. publication.
  29.  
  30.     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  31.     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  32.               All rights reserved.
  33. ********************************************************************/ 
  34.  
  35. #ifndef _sys_resource_h
  36. #define _sys_resource_h
  37.  
  38. #ifndef _SYS_TIME_H
  39. #include <sys/time.h>
  40. #endif
  41.  
  42. /*
  43.  * Process priority specifications to get/setpriority.
  44.  */
  45. #define    PRIO_MIN    -20
  46. #define    PRIO_MAX    20
  47.  
  48. #define    PRIO_PROCESS    0
  49. #define    PRIO_PGRP    1
  50. #define    PRIO_USER    2
  51.  
  52. /*
  53.  * Resource utilization information.
  54.  */
  55.  
  56. #define    RUSAGE_SELF    0
  57. #define    RUSAGE_CHILDREN    -1
  58.  
  59. struct    rusage {
  60.     struct timeval ru_utime;    /* user time used */
  61.     struct timeval ru_stime;    /* system time used */
  62.     long    ru_maxrss;
  63. #define    ru_first    ru_ixrss
  64.     long    ru_ixrss;        /* XXX: 0 */
  65.     long    ru_idrss;        /* XXX: sum of rm_asrss */
  66.     long    ru_isrss;        /* XXX: 0 */
  67.     long    ru_minflt;        /* any page faults not requiring I/O */
  68.     long    ru_majflt;        /* any page faults requiring I/O */
  69.     long    ru_nswap;        /* swaps */
  70.     long    ru_inblock;        /* block input operations */
  71.     long    ru_oublock;        /* block output operations */
  72.     long    ru_msgsnd;        /* messages sent */
  73.     long    ru_msgrcv;        /* messages received */
  74.     long    ru_nsignals;        /* signals received */
  75.     long    ru_nvcsw;        /* voluntary context switches */
  76.     long    ru_nivcsw;        /* involuntary " */
  77. #define    ru_last        ru_nivcsw
  78. };
  79.  
  80. /*
  81.  * Resource limits
  82.  * RLIMIT_RSS removed so RLIMIT_NOFILE takes the value of 5
  83.  * to stay compatible with svr4
  84.  */
  85. #define    RLIMIT_CPU    0        /* cpu time in milliseconds */
  86. #define    RLIMIT_FSIZE    1        /* maximum file size */
  87. #define    RLIMIT_DATA    2        /* data size */
  88. #define    RLIMIT_STACK    3        /* stack size */
  89. #define    RLIMIT_CORE    4        /* core file size */
  90. #define    RLIMIT_NOFILE    5        /* maximum descriptor index + 1 */
  91.  
  92. #define    RLIM_NLIMITS    7        /* number of resource limits */
  93.  
  94. #define    RLIM_INFINITY    0x7fffffff
  95.  
  96. typedef unsigned long rlim_t;
  97.  
  98. struct rlimit {
  99.     int    rlim_cur;        /* current (soft) limit */
  100.     int    rlim_max;        /* maximum value for rlim_cur */
  101. };
  102.  
  103. #endif /*!_sys_resource_h*/
  104.