home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / sys / resource.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  1.2 KB  |  81 lines

  1.  
  2. /*
  3.  * $VER: sys/resource.h 1.0 (17.4.93)
  4.  *
  5.  * (c)Copyright 1992 Obvious Implementations Corp, All Rights Reserved
  6.  */
  7.  
  8. #ifndef SYS_RESOURCE_H
  9. #define SYS_RESOURCE_H
  10.  
  11.  
  12.  
  13. #ifndef _RESOURCE_H_
  14. #define _RESOURCE_H_
  15.  
  16.  
  17. #define PRIO_MIN -20
  18. #define PRIO_MAX 20
  19.  
  20. #define PRIO_PROCESS 0
  21. #define PRIO_PGRP 1
  22. #define PRIO_USER 2
  23.  
  24.  
  25.  
  26. #define RUSAGE_SELF 0
  27. #define RUSAGE_CHILDREN -1
  28.  
  29. struct rusage {
  30.  struct timeval ru_utime; 
  31.  struct timeval ru_stime; 
  32.  long ru_maxrss; 
  33. #define ru_first ru_ixrss
  34.  long ru_ixrss; 
  35.  long ru_idrss; 
  36.  long ru_isrss; 
  37.  long ru_minflt; 
  38.  long ru_majflt; 
  39.  long ru_nswap; 
  40.  long ru_inblock; 
  41.  long ru_oublock; 
  42.  long ru_msgsnd; 
  43.  long ru_msgrcv; 
  44.  long ru_nsignals; 
  45.  long ru_nvcsw; 
  46.  long ru_nivcsw; 
  47. #define ru_last ru_nivcsw
  48. };
  49.  
  50.  
  51. #define RLIMIT_CPU 0 
  52. #define RLIMIT_FSIZE 1 
  53. #define RLIMIT_DATA 2 
  54. #define RLIMIT_STACK 3 
  55. #define RLIMIT_CORE 4 
  56. #define RLIMIT_RSS 5 
  57. #define RLIMIT_MEMLOCK 6 
  58. #define RLIMIT_NPROC 7 
  59. #define RLIMIT_OFILE 8 
  60.  
  61. #define RLIM_NLIMITS 9 
  62.  
  63. #define RLIM_INFINITY 0x7fffffff
  64.  
  65. struct rlimit {
  66.  long rlim_cur; 
  67.  long rlim_max; 
  68. };
  69.  
  70. int getpriority (int, int);
  71. int getrlimit (int, struct rlimit *);
  72. int getrusage (int, struct rusage *);
  73. int setpriority (int, int, int);
  74. int setrlimit (int, const struct rlimit *);
  75.  
  76. #endif 
  77.  
  78.  
  79. #endif
  80.  
  81.