Subversion Repositories Kolibri OS

Rev

Rev 8411 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8411 Rev 8416
Line 1... Line -...
1
#ifndef __dj_include_sys_resource_h_
-
 
2
#define __dj_include_sys_resource_h_
-
 
3
 
-
 
4
#ifdef __cplusplus
-
 
5
extern "C" {
-
 
6
#endif
-
 
7
 
-
 
8
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
-
 
9
 
-
 
10
#ifndef __STRICT_ANSI__
-
 
11
 
-
 
12
#ifndef _POSIX_SOURCE
-
 
13
 
-
 
14
#include 
1
#include 
Line 15... Line -...
15
 
-
 
16
#define RUSAGE_SELF     0               /* calling process */
-
 
17
#define RUSAGE_CHILDREN -1              /* terminated child processes */
-
 
18
 
2
 
19
struct rusage {
3
struct rusage {
20
  struct timeval ru_utime;	/* user time used */
4
  struct timeval ru_utime;	/* user time used */
21
  struct timeval ru_stime;	/* system time used */
5
  struct timeval ru_stime;	/* system time used */
22
  long ru_maxrss;		/* integral max resident set size */
6
  long ru_maxrss;		/* integral max resident set size */
Line 33... Line 17...
33
  long ru_nsignals;		/* signals received */
17
  long ru_nsignals;		/* signals received */
34
  long ru_nvcsw;		/* voluntary context switches */
18
  long ru_nvcsw;		/* voluntary context switches */
35
  long ru_nivcsw;		/* involuntary context switches */
19
  long ru_nivcsw;		/* involuntary context switches */
36
};
20
};
Line 37... Line -...
37
 
-
 
38
#define RLIMIT_CPU	0	/* cpu time in milliseconds */
-
 
39
#define RLIMIT_FSIZE	1	/* maximum file size */
-
 
40
#define RLIMIT_DATA	2	/* data size */
-
 
41
#define RLIMIT_STACK	3	/* stack size */
-
 
42
#define RLIMIT_CORE	4	/* core file size */
-
 
43
#define RLIMIT_RSS	5	/* resident set size */
-
 
44
#define RLIMIT_MEMLOCK	6	/* locked-in-memory address space */
-
 
45
#define RLIMIT_NPROC	7	/* number of processes */
-
 
46
#define RLIMIT_NOFILE	8	/* number of open files */
-
 
47
 
-
 
48
#define RLIM_NLIMITS	9	/* number of resource limits */
-
 
49
#define RLIM_INFINITY	((long) ((1UL << 31) - 1UL))
-
 
50
 
-
 
51
struct rlimit {
-
 
52
  long rlim_cur;		/* current (soft) limit */
-
 
53
  long rlim_max;		/* maximum value for rlim_cur */
-
 
54
};
-
 
55
 
21
 
56
/// STUB ///
22
/// STUB ///
57
int getrusage(int _who, struct rusage *_rusage) {};
-
 
58
 
-
 
59
#endif /* !_POSIX_SOURCE */
-
 
60
#endif /* !__STRICT_ANSI__ */
-
 
61
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
-
 
62
 
-
 
63
#ifndef __dj_ENFORCE_FUNCTION_CALLS
-
 
64
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
-
 
65
 
-
 
66
#ifdef __cplusplus
-
 
67
}
-
 
68
#endif
-
 
69
 
-