home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc25.zoo / resource.h < prev    next >
C/C++ Source or Header  |  1992-10-18  |  1KB  |  47 lines

  1. #ifndef _RESOURCE_H
  2. #define _RESOURCE_H
  3.  
  4. #include <time.h>
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. #define RLIM_INFINITY    0x7fffffffL
  11.  
  12. #define RLIMIT_CPU    1        /* max cpu time allowed */
  13. #define RLIMIT_RSS    2        /* max memory allowed (total) */
  14. #define RLIMIT_DATA    3        /* max malloc'd memory allowed */
  15. #define RLIMIT_STACK    4        /* max stack size (not used) */
  16. #define RLIMIT_FSIZE    5        /* max file size (not used) */
  17. #define RLIMIT_CORE    6        /* max core file size (not used) */
  18.  
  19. #define RLIM_NLIMITS    6
  20.  
  21. #define RUSAGE_SELF    0
  22. #define RUSAGE_CHILDREN    1
  23.  
  24. #ifndef _COMPILER_H
  25. #include <compiler.h>
  26. #endif
  27.  
  28. struct rusage {
  29.     struct timeval    ru_utime;    /* user time used */
  30.     struct timeval    ru_stime;    /* system time used */
  31. };
  32.  
  33. struct rlimit {
  34.     long rlim_cur;
  35.     long rlim_max;
  36. };
  37.  
  38. __EXTERN int    setrlimit    __PROTO((int mode, struct rlimit *rl));
  39. __EXTERN int    getrlimit    __PROTO((int mode, struct rlimit *rl));
  40. __EXTERN int    getrusage    __PROTO((int which, struct rusage *r));
  41.  
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45.  
  46. #endif /* _RESOURCE_H */
  47.