home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / resource < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-11  |  2.1 KB  |  82 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/resource.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/resource.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    resource.h,v $
  8.  * Revision 1.1  95/01/11  10:19:40  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:20:46  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)resource.h    1.2 87/05/15 3.2/4.3NFSSRC */
  16. /*
  17.  * Copyright (c) 1982, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)resource.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. /*
  25.  * Process priority specifications to get/setpriority.
  26.  */
  27. #define    PRIO_MIN    -20
  28. #define    PRIO_MAX    20
  29.  
  30. #define    PRIO_PROCESS    0
  31. #define    PRIO_PGRP    1
  32. #define    PRIO_USER    2
  33.  
  34. /*
  35.  * Resource utilization information.
  36.  */
  37.  
  38. #define    RUSAGE_SELF    0
  39. #define    RUSAGE_CHILDREN    -1
  40.  
  41. struct    rusage {
  42.     struct timeval ru_utime;    /* user time used */
  43.     struct timeval ru_stime;    /* system time used */
  44.     long    ru_maxrss;
  45. #define    ru_first    ru_ixrss
  46.     long    ru_ixrss;        /* integral shared memory size */
  47.     long    ru_idrss;        /* integral unshared data " */
  48.     long    ru_isrss;        /* integral unshared stack " */
  49.     long    ru_minflt;        /* page reclaims */
  50.     long    ru_majflt;        /* page faults */
  51.     long    ru_nswap;        /* swaps */
  52.     long    ru_inblock;        /* block input operations */
  53.     long    ru_oublock;        /* block output operations */
  54.     long    ru_msgsnd;        /* messages sent */
  55.     long    ru_msgrcv;        /* messages received */
  56.     long    ru_nsignals;        /* signals received */
  57.     long    ru_nvcsw;        /* voluntary context switches */
  58.     long    ru_nivcsw;        /* involuntary " */
  59. #define    ru_last        ru_nivcsw
  60. };
  61.  
  62. /*
  63.  * Resource limits
  64.  */
  65. #define    RLIMIT_CPU    0        /* cpu time in milliseconds */
  66. #define    RLIMIT_FSIZE    1        /* maximum file size */
  67. #define    RLIMIT_DATA    2        /* data size */
  68. #define    RLIMIT_STACK    3        /* stack size */
  69. #define    RLIMIT_CORE    4        /* core file size */
  70. #define    RLIMIT_RSS    5        /* resident set size */
  71.  
  72. #define    RLIM_NLIMITS    6        /* number of resource limits */
  73.  
  74. #define    RLIM_INFINITY    0x7fffffff
  75.  
  76. struct rlimit {
  77.     int    rlim_cur;        /* current (soft) limit */
  78.     int    rlim_max;        /* maximum value for rlim_cur */
  79. };
  80.  
  81. /* EOF resource.h */
  82.