home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / resource.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.4 KB  |  63 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. #ifndef _SYS_RESOURCE_H
  11. #define _SYS_RESOURCE_H
  12.  
  13. #ident    "@(#)/usr/include/sys/resource.h.sl 1.1 4.0 12/08/90 31484 AT&T-USL"
  14. /*
  15.  * Process priority specifications
  16.  */
  17.  
  18. #define    PRIO_PROCESS    0
  19. #define    PRIO_PGRP    1
  20. #define    PRIO_USER    2
  21.  
  22.  
  23. /*
  24.  * Resource limits
  25.  */
  26.  
  27. #define    RLIMIT_CPU    0        /* cpu time in milliseconds */
  28. #define    RLIMIT_FSIZE    1        /* maximum file size */
  29. #define    RLIMIT_DATA    2        /* data size */
  30. #define    RLIMIT_STACK    3        /* stack size */
  31. #define    RLIMIT_CORE    4        /* core file size */
  32. #define RLIMIT_NOFILE    5        /* file descriptors */
  33. #define RLIMIT_VMEM    6        /* maximum mapped memory */
  34.  
  35. #define    RLIM_NLIMITS    7        /* number of resource limits */
  36. #define RLIMIT_AS    RLIMIT_VMEM
  37. #define    RLIM_INFINITY    0x7fffffff
  38.  
  39. typedef unsigned long rlim_t;
  40.  
  41. struct rlimit {
  42.     rlim_t    rlim_cur;        /* current limit */
  43.     rlim_t    rlim_max;        /* maximum value for rlim_cur */
  44. };
  45.  
  46. #ifdef _KERNEL
  47.  
  48. extern struct rlimit rlimits[];
  49.  
  50. #if defined(__STDC__)
  51.  
  52. extern int rlimit(int, rlim_t, rlim_t);
  53.  
  54. #else
  55.  
  56. extern int rlimit();
  57.  
  58. #endif    /* __STDC__ */
  59.  
  60. #endif    /* _KERNEL */
  61.  
  62. #endif    /* _SYS_RESOURCE_H */
  63.